Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update to launchy 2.0

  • Loading branch information...
commit bea5b313783eaaf17e38a05a4eaa8c45c1eedd2a 1 parent fea21fc
@copiousfreetime copiousfreetime authored
View
2  Gemfile
@@ -7,7 +7,7 @@ gem "merb-core", "1.0.15"
gem "selenium-client", "1.2.17"
gem "mechanize", "0.9.3"
gem "rails", "2.3.4"
-gem "launchy", "0.3.3"
+gem "launchy", "2.0.2"
gem "rack-test", "0.5.2"
gem "sinatra", "0.9.4"
gem "mongrel", "1.1.5"
View
2  lib/webrat/core/save_and_open_page.rb
@@ -19,7 +19,7 @@ def save_and_open_page
def open_in_browser(path) # :nodoc
require "launchy"
- Launchy::Browser.run(path)
+ Launchy.open(path)
rescue LoadError
warn "Sorry, you need to install launchy to open pages: `gem install launchy`"
end
View
6 spec/public/save_and_open_spec.rb
@@ -19,7 +19,7 @@
Time.stub!(:now => 1234)
require "launchy"
- Launchy::Browser.stub!(:run)
+ Launchy.stub!(:open)
@file_handle = mock("file handle")
File.stub!(:open).and_yield(@file_handle)
@@ -34,12 +34,12 @@
end
it "should open the temp file in a browser with Launchy" do
- Launchy::Browser.should_receive(:run)
+ Launchy.should_receive(:open)
save_and_open_page
end
it "should fail gracefully if Launchy is not available" do
- Launchy::Browser.should_receive(:run).and_raise(LoadError)
+ Launchy.should_receive(:open).and_raise(LoadError)
lambda do
save_and_open_page
Please sign in to comment.
Something went wrong with that request. Please try again.