Sha256: 3a4d255a7299cdb86edcc639a18c533443f39b0a8ff8400ecbd6779c827e8c7b

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

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

    def add
      gem_group :development, :test do
        gem "rspec-rails"
      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

      run "bundle install"

      generate 'rspec:install'

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

      template 'rspec_base/shared_examples/sample_shared.rb', 'spec/support/shared_examples/sample_shared.rb'

      run 'bundle exec spring binstub rspec'

    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
teleporter-0.0.17 lib/generators/initial/rspec_base.rb
teleporter-0.0.16 lib/generators/initial/rspec_base.rb
teleporter-0.0.15 lib/generators/initial/rspec_base.rb
teleporter-0.0.14 lib/generators/initial/rspec_base.rb