spec/capybara/angular_spec.rb in capybara-angular-0.2.5 vs spec/capybara/angular_spec.rb in capybara-angular-0.2.6

- old
+ new

@@ -25,10 +25,20 @@ scenario 'when using ng-app not on the body tag to bootstrap an application' do open_ng_app_not_on_body_bootstrap_page timeout_page_should_have_waited end + scenario 'when visiting a non-angular page' do + open_non_angular_page + non_angular_page_should_load + end + + scenario 'when visiting a non-angular page that loads angular javascript' do + open_non_angular_page_with_angular_javascript + non_angular_page_should_load + end + def open_manual_bootstrap_page visit '/manual.html' end def open_ng_app_bootstrap_page @@ -37,9 +47,21 @@ def open_ng_app_not_on_body_bootstrap_page visit '/ng-app-not-on-body.html' end + def open_non_angular_page + visit '/non-angular-page.html' + end + + def open_non_angular_page_with_angular_javascript + visit '/non-angular-page-with-angular-javascript.html' + end + def timeout_page_should_have_waited expect(page).to have_content('waited') + end + + def non_angular_page_should_load + expect(page).to have_content('non-angular page') end end