[rspec-users] disabling before filters in rspec?

2010-01-04 Thread jollyroger
Hey guys, i have this before-filter in my application-controller: def login_required if !current_user redirect_to join_welcome_path and return end end This before-filter is prepended before all other before-filters in my application_controller.rb like this prepend_before_filt

Re: [rspec-users] disabling before filters in rspec?

2010-01-04 Thread jollyroger
Hi David, well, the way you put it it all sounds totally logical...:-) Thanks a lot for the suggestions, I guess I need to improve my specs On Jan 4, 11:20 am, David Chelimsky wrote: > On Sun, Jan 3, 2010 at 6:56 PM, jollyroger > wrote: > > > > > Hey guys, > >

[rspec-users] Strange validation errors

2010-03-15 Thread jollyroger
Hey guys, I'm having a serious rspec-problem at the moment: I keep getting strange, empty validation errors when I run the whole spec-suite: # 1) ActiveRecord::RecordInvalid in 'LikesController DELETE destroy' should change like-cou

[rspec-users] Insufficient database clean-up between specs

2010-03-15 Thread jollyroger
Hey guys, unfortunately I've got one more issue with rspec right now. It seems like rspec isnt properly cleaning up the database after each spec. I have the following spec: ### describe ProfilesController do describe "GET 'index'

Re: [rspec-users] Strange validation errors

2010-03-18 Thread jollyroger
rspec-stubbing everything behaved as expected. I now switched from mocha to rspec-stubbing / mocking, and so far, works like a charm - thanks for your time and help. On Mar 15, 1:40 pm, David Chelimsky wrote: > On Mon, Mar 15, 2010 at 6:54 AM, jollyroger > > > > wrote: > >

Re: [rspec-users] Insufficient database clean-up between specs

2010-03-20 Thread jollyroger
David and Matt, ok, i was under the impression that rspec would clean up the database. Got it working now, thanks for the help... On Mar 16, 11:10 am, Matt Wynne wrote: > On 15 Mar 2010, at 12:34, David Chelimsky wrote: > > > > > On Mon, Mar 15, 2010 at 7:24 AM, jollyroger &g

[rspec-users] rspec doesnt recognize a custom mime type

2010-04-29 Thread jollyroger
Hey guys, I have a custom MIME type registered like that: cat config/initializers/mime_types.rb Mime::Type.register "lightbox", :lightbox -> This works perfectly well in my application. However my corresponding specs keep failing, the code: The controller-spec: describe UserSessionsControll

Re: [rspec-users] rspec doesnt recognize a custom mime type

2010-04-29 Thread jollyroger
Ok, fixed it, in a nutshell: Doesnt work: get :new, :format => :lightbox Works: get :new, :format => 'lightbox' What was really confusing was that in BOTH cases the same URL appeared in the log. Here is my turn on what happened: Internally - when rails sees a mime-type / format - rails dist