diff --git a/lib/webrat/selenium/matchers/have_content.rb b/lib/webrat/selenium/matchers/have_content.rb index f1f6973..26ad435 100644 --- a/lib/webrat/selenium/matchers/have_content.rb +++ b/lib/webrat/selenium/matchers/have_content.rb @@ -14,7 +14,7 @@ module Webrat @error_message = e.message false end - + def does_not_match?(response) response.session.wait_for do !response.selenium.is_text_present(text_finder) @@ -44,7 +44,7 @@ module Webrat "match #{@content.inspect}" end end - + def text_finder if @content.is_a?(Regexp) "regexp:#{@content.source}" diff --git a/spec/public/matchers/contain_spec.rb b/spec/public/matchers/contain_spec.rb index 40017fb..d71c66a 100644 --- a/spec/public/matchers/contain_spec.rb +++ b/spec/public/matchers/contain_spec.rb @@ -19,11 +19,11 @@ describe "contain" do it "should call element#matches? when the argument is a regular expression" do @body.should contain(/hello, world/) end - + it "should treat newlines as spaces" do "
it takes\ndifferent strokes
".should contain("it takes different strokes") end - + it "should multiple spaces as a single space" do "
it takes different strokes
".should contain("it takes different strokes") end diff --git a/spec/public/save_and_open_spec.rb b/spec/public/save_and_open_spec.rb index 3e090cb..567a4b4 100644 --- a/spec/public/save_and_open_spec.rb +++ b/spec/public/save_and_open_spec.rb @@ -29,7 +29,7 @@ describe "save_and_open_page" do it "should save pages to the directory configured" do Webrat.configuration.stub!(:saved_pages_dir => "path/to/dir") File.should_receive(:open).with("path/to/dir/webrat-1234.html", "w").and_yield(@file_handle) - + save_and_open_page end