Class: PagesCore::Generators::RspecGenerator

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

Instance Method Summary collapse

Instance Method Details

#setup_rspecObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/rails/generators/pages_core/rspec/rspec_generator.rb', line 23

def setup_rspec
  create_file File.join(".rspec"), "--format Fuubar\n--colour\n" \
                                   "--require spec_helper"
  create_file File.join("spec/controllers/.keep")
  create_file File.join("spec/mailers/preview/.keep")
  create_file File.join("spec/models/.keep")
  create_file File.join("spec/system/.keep")
  template "spec_helper.rb", File.join("spec/spec_helper.rb")
  template "rails_helper.rb", File.join("spec/rails_helper.rb")
  template "factories.rb", File.join("spec/factories.rb")
  template "mailer_macros.rb", File.join("spec/support/mailer_macros.rb")
  template("page_templates_spec.rb",
           File.join("spec/system/page_templates_spec.rb"))
end

#setup_test_gemsObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/rails/generators/pages_core/rspec/rspec_generator.rb', line 9

def setup_test_gems
  gem_group :development, :test do
    gem "capybara"
    gem "factory_bot_rails"
    gem "fuubar"
    gem "json_spec"
    gem "rspec-rails"
    gem "rspec_junit_formatter"
    gem "selenium-webdriver"
    gem "shoulda-matchers", require: false
    gem "simplecov", require: false
  end
end