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
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,
>
>
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
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'
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:
> >
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
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
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