Working with RSpec & Capybara, I\'m getting an interesting test failure mode which goes away with a few subtle rearrangements of lines in the test case...stuff that shouldn\
I think the user variable in RSpec has overwritten the one in the controller so it didn't work ? (couldn't get right user.email in the test)
Before :
user = Factory(:user)
user.password! '2468'
visit '/sessions/index' # user gets overwritten
fill_in 'Email', :with => user.email # can't get user.email
After :
visit '/sessions/index' # Execute action
user = Factory(:user) # user gets overwritten
user.password! '2468'
fill_in 'Email', :with => user.email # user.email works