Sha256: 766cbaf896ab7b60bf9590e516f44f99a2dcd1b60e2a42849fd68209941442a8

Contents?: true

Size: 968 Bytes

Versions: 2

Compression:

Stored size: 968 Bytes

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/capybara.rb',         'spec/support/capybara.rb'
      template 'rspec_base/database_cleaner.rb', 'spec/support/database_cleaner.rb'
      template 'rspec_base/factory_girl.rb',     'spec/support/factory_girl.rb'
      template 'rspec_base/spec_helpers.rb',     'spec/support/spec_helpers.rb'
      template 'rspec_base/devise.rb',           'spec/support/devise.rb'

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
teleporter-0.0.12 lib/generators/initial/rspec_base.rb
teleporter-0.0.11 lib/generators/initial/rspec_base.rb