femto Zheng
2012-Jul-18 10:42 UTC
[rspec-users] How do I specify login with controller spec with rspec-rails?
Hello all, I''m new to rspec-rails, looking at rspec-rails''s documentation is a bit confusing, I have an application, where users needs to login to use, so how do I specify login with controller spec with rspec-rails? like a config.(:before_every_example) login something? could someone provide some information? thanks. -- http://hi.baidu.com/femto http://www.aisiming.com/ http://maptu.heroku.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120718/8f9c828d/attachment.html>
Justin Ko
2012-Jul-18 15:21 UTC
[rspec-users] How do I specify login with controller spec with rspec-rails?
On Jul 18, 2012, at 4:42 AM, femto Zheng wrote:> Hello all, I''m new to rspec-rails, > looking at rspec-rails''s documentation is a bit confusing, > I have an application, > where users needs to login to use, > so how do I specify login with controller spec with rspec-rails? > > like a config.(:before_every_example) login something? > could someone provide some information? thanks. > > -- > http://hi.baidu.com/femto > http://www.aisiming.com/ > http://maptu.heroku.com/ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-usersAre you using an authentication gem/engine? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120718/9e18e65d/attachment.html>
femto Zheng
2012-Jul-18 15:30 UTC
[rspec-users] How do I specify login with controller spec with rspec-rails?
yes, using devise. On Wed, Jul 18, 2012 at 11:21 PM, Justin Ko <jko170 at gmail.com> wrote:> > On Jul 18, 2012, at 4:42 AM, femto Zheng wrote: > > Hello all, I''m new to rspec-rails, > looking at rspec-rails''s documentation is a bit confusing, > I have an application, > where users needs to login to use, > so how do I specify login with controller spec with rspec-rails? > > like a config.(:before_every_example) login something? > could someone provide some information? thanks. > > -- > http://hi.baidu.com/femto > http://www.aisiming.com/ > http://maptu.heroku.com/ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > > Are you using an authentication gem/engine? > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- http://hi.baidu.com/femto http://www.aisiming.com/ http://maptu.heroku.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120718/331b538f/attachment.html>
Justin Ko
2012-Jul-18 15:57 UTC
[rspec-users] How do I specify login with controller spec with rspec-rails?
On Jul 18, 2012, at 9:30 AM, femto Zheng wrote:> yes, using devise. > > On Wed, Jul 18, 2012 at 11:21 PM, Justin Ko <jko170 at gmail.com> wrote: > > On Jul 18, 2012, at 4:42 AM, femto Zheng wrote: > >> Hello all, I''m new to rspec-rails, >> looking at rspec-rails''s documentation is a bit confusing, >> I have an application, >> where users needs to login to use, >> so how do I specify login with controller spec with rspec-rails? >> >> like a config.(:before_every_example) login something? >> could someone provide some information? thanks. >> >> -- >> http://hi.baidu.com/femto >> http://www.aisiming.com/ >> http://maptu.heroku.com/ >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > Are you using an authentication gem/engine? > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > > > -- > http://hi.baidu.com/femto > http://www.aisiming.com/ > http://maptu.heroku.com/ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-usershttps://github.com/plataformatec/devise/wiki/_pages https://github.com/plataformatec/devise/wiki/How-To:-Stub-authentication-in-controller-specs -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120718/d8d19879/attachment-0001.html>
femto Zheng
2012-Jul-26 12:22 UTC
[rspec-users] How do I specify login with controller spec with rspec-rails?
Thanks. Can I add some configuration to include that piece of code to some controller then I didn''t to write that kind of code again for each needed authenticated controller? On Wed, Jul 18, 2012 at 11:57 PM, Justin Ko <jko170 at gmail.com> wrote:> > On Jul 18, 2012, at 9:30 AM, femto Zheng wrote: > > yes, using devise. > > On Wed, Jul 18, 2012 at 11:21 PM, Justin Ko <jko170 at gmail.com> wrote: > >> >> On Jul 18, 2012, at 4:42 AM, femto Zheng wrote: >> >> Hello all, I''m new to rspec-rails, >> looking at rspec-rails''s documentation is a bit confusing, >> I have an application, >> where users needs to login to use, >> so how do I specify login with controller spec with rspec-rails? >> >> like a config.(:before_every_example) login something? >> could someone provide some information? thanks. >> >> -- >> http://hi.baidu.com/femto >> http://www.aisiming.com/ >> http://maptu.heroku.com/ >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> >> >> Are you using an authentication gem/engine? >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > > > -- > http://hi.baidu.com/femto > http://www.aisiming.com/ > http://maptu.heroku.com/ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > > https://github.com/plataformatec/devise/wiki/_pages > > > https://github.com/plataformatec/devise/wiki/How-To:-Stub-authentication-in-controller-specs > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- http://hi.baidu.com/femto http://www.aisiming.com/ http://maptu.heroku.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120726/49c8a1e1/attachment.html>