Sha256: 56a8fbccbebd4551450c8fb332b9dbc0841f45cf1c397357fd8e75a2db36fb41

Contents?: true

Size: 1.23 KB

Versions: 9

Compression:

Stored size: 1.23 KB

Contents

module Initial
  class RspecGenerator < Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)

    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'

      template 'rspec/configs/capybara.rb',         'spec/support/configs/capybara.rb'
      template 'rspec/configs/database_cleaner.rb', 'spec/support/configs/database_cleaner.rb'
      template 'rspec/configs/factory_girl.rb',     'spec/support/configs/factory_girl.rb'
      template 'rspec/configs/devise.rb',           'spec/support/configs/devise.rb'
      template 'rspec/configs/vcr.rb',              'spec/support/configs/vcr.rb'

      template 'rspec/shared_examples/sample_shared.rb', 'spec/support/shared_examples/sample_shared.rb'
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
teleporter-0.0.30 lib/generators/initial/rspec.rb
teleporter-0.0.29 lib/generators/initial/rspec.rb
teleporter-0.0.28 lib/generators/initial/rspec.rb
teleporter-0.0.27 lib/generators/initial/rspec.rb
teleporter-0.0.26 lib/generators/initial/rspec.rb
teleporter-0.0.25 lib/generators/initial/rspec.rb
teleporter-0.0.24 lib/generators/initial/rspec.rb
teleporter-0.0.23 lib/generators/initial/rspec.rb
teleporter-0.0.22 lib/generators/initial/rspec.rb