Class: Embryo::Poltergeist
- Inherits:
-
Object
- Object
- Embryo::Poltergeist
- Defined in:
- lib/embryo/poltergeist.rb
Instance Method Summary collapse
-
#initialize(filesystem) ⇒ Poltergeist
constructor
A new instance of Poltergeist.
- #install ⇒ Object
- #poltergeist_helper_data ⇒ Object
Constructor Details
#initialize(filesystem) ⇒ Poltergeist
Returns a new instance of Poltergeist.
3 4 5 |
# File 'lib/embryo/poltergeist.rb', line 3 def initialize(filesystem) @filesystem = filesystem end |
Instance Method Details
#install ⇒ Object
7 8 9 10 |
# File 'lib/embryo/poltergeist.rb', line 7 def install @filesystem.require_gem "poltergeist", "~> 1.0", group: :test @filesystem.write "spec/support/poltergeist.rb", poltergeist_helper_data end |
#poltergeist_helper_data ⇒ Object
12 13 14 15 16 |
# File 'lib/embryo/poltergeist.rb', line 12 def poltergeist_helper_data 'require "capybara/poltergeist" Capybara.javascript_driver = :poltergeist ' end |