Module: Stationed::Generators::Plugins::Webmock
- Included in:
- AppGenerator
- Defined in:
- lib/stationed/generators/plugins/webmock.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/webmock.rb', line 5 def self.prepended(base) base.class_option :webmock, type: :boolean, default: true, desc: 'Install webmock to prevent external HTTP requests in tests' end |
Instance Method Details
#finish_template ⇒ Object
12 13 14 15 16 17 |
# File 'lib/stationed/generators/plugins/webmock.rb', line 12 def finish_template return super unless [:webmock] gem 'webmock', group: :test copy_file 'webmock.rb', 'spec/support/webmock.rb' super end |