Class: RSpecHTML::Browser
- Inherits:
-
Object
- Object
- RSpecHTML::Browser
- Defined in:
- lib/rspec_html/browser.rb
Overview
Convenience utility for loading a provided path in the operating system’s default browser. Used for inspecting documents while debugging tests.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ Browser
constructor
A new instance of Browser.
- #open ⇒ Object
Constructor Details
#initialize(path) ⇒ Browser
Returns a new instance of Browser.
11 12 13 |
# File 'lib/rspec_html/browser.rb', line 11 def initialize(path) @path = path end |
Class Method Details
.open(path) ⇒ Object
7 8 9 |
# File 'lib/rspec_html/browser.rb', line 7 def self.open(path) new(path).open end |
Instance Method Details
#open ⇒ Object
15 16 17 18 |
# File 'lib/rspec_html/browser.rb', line 15 def open log_launch_browser_event system `#{command} '#{path}'` end |