Sha256: 9594a411a54bb525cb7f60e5886c658ab0487c9cef191a8150c475a24e35031c

Contents?: true

Size: 981 Bytes

Versions: 2

Compression:

Stored size: 981 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

      #Bundler.with_clean_env do
        run "bundle install"
      #end

      #Rails::Generators.invoke 'rspec:install'
      generate 'rspec:install'

      template 'capybara.rb', 'spec/support/capybara.rb'
      template 'database_cleaner.rb', 'spec/support/database_cleaner.rb'
      template 'factory_girl.rb', 'spec/support/factory_girl.rb'
      template 'spec_helpers.rb', 'spec/support/spec_helpers.rb'
      template 'devise.rb', 'spec/support/devise.rb'

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
teleporter-0.0.9 lib/generators/initial/rspec_base.rb
teleporter-0.0.8 lib/generators/initial/rspec_base.rb