From 5b73298bed986f4b0a1e015e3215813f60a64c9e Mon Sep 17 00:00:00 2001 From: Dennis Rogenius Date: Sun, 22 Nov 2009 18:58:43 +0100 Subject: [PATCH] spec bug fix --- spec/save_and_open_page_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/save_and_open_page_spec.rb b/spec/save_and_open_page_spec.rb index 0c317513..af26a07b 100644 --- a/spec/save_and_open_page_spec.rb +++ b/spec/save_and_open_page_spec.rb @@ -7,12 +7,12 @@ describe Capybara::SaveAndOpenPage do before do @time = Time.new.strftime("%Y%m%d%H%M%S") - name = "capybara-#{@time}.html" + @name = "capybara-#{@time}.html" @temp_file = mock("FILE") @temp_file.stub!(:write) @temp_file.stub!(:close) - @temp_file.stub!(:path).and_return(name) + @temp_file.stub!(:path).and_return(@name) File.should_receive(:exist?).and_return true File.should_receive(:new).and_return @temp_file @@ -36,7 +36,7 @@ describe Capybara::SaveAndOpenPage do end it "should open the file in the browser" do - Capybara::SaveAndOpenPage.should_receive(:open_in_browser).with(name) + Capybara::SaveAndOpenPage.should_receive(:open_in_browser).with(@name) Capybara::SaveAndOpenPage.save_and_open_page @html end end