Class: Teleport::RspecGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/teleport/rspec.rb

Instance Method Summary collapse

Instance Method Details

#addObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/generators/teleport/rspec.rb', line 5

def add
  gem_group :development, :test do
    gem "rspec-rails"
    gem 'spring'
    gem 'spring-commands-rspec'
  end

  gem_group :test do
    gem 'factory_girl_rails'
    gem 'capybara'
    gem 'database_cleaner'
    gem 'shoulda-matchers'
    gem 'poltergeist'
    gem 'phantomjs', require: 'phantomjs/poltergeist'
    gem 'vcr'
    gem 'webmock'
  end

  Bundler.with_clean_env do
    run "bundle install"
    run 'bundle exec spring binstub rspec'
  end

  generate 'rspec:install'

  directory 'rspec/configs', 'spec/support/configs'
  directory 'rspec/factories', 'spec/factories'
  directory 'rspec/shared_examples', 'spec/support/shared_examples'
end