From 2c27d6b6b3ac5a7e84f728f4cb3a7c0f63f9a238 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Fri, 22 Jul 2011 12:48:51 -0400 Subject: [PATCH] handle when forms try to leave, too --- spec/bin/jasmine-headless-webkit_spec.rb | 4 ++-- spec/jasmine/click_button/click_button.js | 2 +- spec/jasmine/click_button/click_button.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/bin/jasmine-headless-webkit_spec.rb b/spec/bin/jasmine-headless-webkit_spec.rb index d079c93..ebe627d 100644 --- a/spec/bin/jasmine-headless-webkit_spec.rb +++ b/spec/bin/jasmine-headless-webkit_spec.rb @@ -72,9 +72,9 @@ describe "jasmine-headless-webkit" do describe 'tries to click a button' do it "should not leave the page nor loop" do system %{bin/jasmine-headless-webkit -j spec/jasmine/click_button/click_button.yml --report #{report}} - $?.exitstatus.should == 1 + $?.exitstatus.should == 0 - report.should be_a_report_containing(2, 0, false) + report.should be_a_report_containing(0, 0, false) end end diff --git a/spec/jasmine/click_button/click_button.js b/spec/jasmine/click_button/click_button.js index 6c2afd0..628dae2 100644 --- a/spec/jasmine/click_button/click_button.js +++ b/spec/jasmine/click_button/click_button.js @@ -1,5 +1,5 @@ function yes() { - $('body').append('