rspec - Why do a series of specs fail when each single spec succeeds? -


on capybara 2.1.0 rspec 2.12.0:

if run $ rspec spec/features/user_sees_leaderboard_spec.rb, spec passes.

if run $ rspec spec/features/*, test fails, claiming:

capybara::elementnotfound:    unable find css "#flash" 

if save_and_open_page, #flash present , visible.

here's helper failure occurring:

def sign_in_as(user)   visit new_user_session_path   fill_in "email", with: user.email   fill_in "password", with: user.password   click_button "sign in"   flash = find("#flash")    flash.should have_content "you signed in." end 

any ideas? i'm new-ish capybara not sure start. thanks!

edit/update:

by doing save_and_open_page on set of specs fail when run able see series of successes followed series of pages saying nothing besides "not found" in body tag. google didn't turn – thoughts?

update #2

i noticed "not found" content in body began after spec used capybara-webkit run javascript. explicitly resetting capybara.current_driver = :rack_test in after(:all) block doesn't fix issue, think relevant.

while still not 100% sure caused this, removing capybara.automatic_reload = false tests using capybara-webkit resolved issue.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -