Module: Stationed::Generators::Plugins::Poltergeist
- Included in:
- AppGenerator
- Defined in:
- lib/stationed/generators/plugins/poltergeist.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/stationed/generators/plugins/poltergeist.rb', line 5 def self.prepended(base) base.class_option :poltergeist, type: :boolean, default: true, desc: 'Include Poltergeist for headless browser testing' end |
Instance Method Details
#finish_template ⇒ Object
12 13 14 15 16 17 |
# File 'lib/stationed/generators/plugins/poltergeist.rb', line 12 def finish_template return super unless [:capybara] && [:poltergeist] gem 'poltergeist', group: :test copy_file 'poltergeist.rb', 'spec/support/poltergeist.rb' super end |