Whitespace
This commit is contained in:
parent
4ac8456a48
commit
eb3a4ff5d6
|
@ -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}"
|
||||
|
|
|
@ -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
|
||||
"<div>it takes\ndifferent strokes</div>".should contain("it takes different strokes")
|
||||
end
|
||||
|
||||
|
||||
it "should multiple spaces as a single space" do
|
||||
"<div>it takes different strokes</div>".should contain("it takes different strokes")
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue