Re: [rspec-users] rails3 session issue i think

2011-05-17 Thread David Chelimsky
On May 11, 2011, at 4:10 PM, Chris Habgood wrote: > I just started using rspec. I have controllers that inherit from an admin > controller. If I modify them to inherit from applicationcontroller the rspec > test works. If I inherit from admincontroller i get "" back for a new > template. Is

Re: [rspec-users] rails3 session issue i think

2011-05-17 Thread Justin Ko
On Thu, May 12, 2011 at 10:32 AM, Chris Habgood wrote: > I have this in my admin controller: > > before_filter :login_required > before_filter :admin_required > > def admin_required > current_user.is_admin? > end > > ___ > rspec-users ma

Re: [rspec-users] rails3 session issue i think

2011-05-17 Thread Justin Ko
On Tue, May 17, 2011 at 11:18 PM, Justin Ko wrote: > > > On Thu, May 12, 2011 at 10:32 AM, Chris Habgood wrote: > >> I have this in my admin controller: >> >> before_filter :login_required >> before_filter :admin_required >> >> def admin_required >> current_user.is_admin? >> end >

Re: [rspec-users] RSpec stub question

2011-05-17 Thread Justin Ko
On Sat, May 14, 2011 at 12:13 AM, arunsark wrote: > Hi > > I am using Mongoid. In Mongoid while saving a record we typically give > like in the controller > @post.safely.save > For a model class Post > > I am writing rspecs for my controller and want to mock the model. So > what I am doing is > >

Re: [rspec-users] rails3 session issue i think

2011-05-17 Thread Chris Habgood
I have this in my admin controller: before_filter :login_required before_filter :admin_required def admin_required current_user.is_admin? end ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/

[rspec-users] rails3 session issue i think

2011-05-17 Thread Chris Habgood
I just started using rspec. I have controllers that inherit from an admin controller. If I modify them to inherit from applicationcontroller the rspec test works. If I inherit from admincontroller i get "" back for a new template. Is there something I am missing to get this to work? The pro

[rspec-users] Adding Heckle Support

2011-05-17 Thread Dan Kubb (dkubb)
Hi Everyone, I read in an earlier thread [1] that there are no plans at this time to add official support for Heckle in RSpec 2. I was thinking that perhaps there might be room for an unofficial extension to add support, and I'd be really interested in writing one. I still find Heckle extremely h

[rspec-users] RSpec stub question

2011-05-17 Thread arunsark
Hi I am using Mongoid. In Mongoid while saving a record we typically give like in the controller @post.safely.save For a model class Post I am writing rspecs for my controller and want to mock the model. So what I am doing is let(:post) { mock_model(Post).as_null_object } before(:each) do Pos