Class: Suspenders::JsDriverGenerator

Inherits:
Generators::Base show all
Defined in:
lib/suspenders/generators/js_driver_generator.rb

Instance Method Summary collapse

Methods inherited from Generators::Base

default_source_root, inherited

Methods included from Actions

#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #replace_in_file

Instance Method Details

#add_gemsObject


5
6
7
8
# File 'lib/suspenders/generators/js_driver_generator.rb', line 5

def add_gems
  gem "webdrivers", group: :test
  Bundler.with_unbundled_env { run "bundle install" }
end

#configure_capybaraObject


10
11
12
13
14
15
16
# File 'lib/suspenders/generators/js_driver_generator.rb', line 10

def configure_capybara
  copy_file "chromedriver.rb", "spec/support/chromedriver.rb"
  copy_file(
    "capybara_silence_puma.rb",
    "spec/support/capybara_silence_puma.rb"
  )
end