Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update to launchy 2.0 #61

Merged
merged 1 commit into from

2 participants

@copiousfreetime

Hi, I have updated launchy and have removed the Launchy::Browser api which webrat appears to use.

This pull request should update webrat to use the updated launchy api.

enjoy,

-jeremy

@indirect indirect merged commit bea5b31 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 18, 2011
  1. @copiousfreetime

    Update to launchy 2.0

    copiousfreetime authored
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.