Displaying 1 result from an estimated 1 matches for "rspec_helper".
Did you mean:
spec_helper
2007 Jul 09
0
Is it bad to use a shared example in rspec_helper.rb?
I want to extract the method for logging in so that I don''t have to include
it in each before call.
Is it bad to use a describe block within the rspec_helper in a rails project
for controller tests?
I have in my spec_helper.rb
describe "an authenticated request", :shared => true do
before( :each ) do
@u = mock_model( User )
mock_login( @u )
end
def mock_login( user )
session[:user] = user
controller.send( :instance_...