Class: Flame::TestingGenerator
- Inherits:
-
Generators::Base
- Object
- Rails::Generators::Base
- Generators::Base
- Flame::TestingGenerator
- Defined in:
- lib/flame/generators/testing_generator.rb
Instance Method Summary collapse
Methods inherited from Generators::Base
Instance Method Details
#import_spec_support ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/flame/generators/testing_generator.rb', line 9 def import_spec_support inject_into_file( "spec/rails_helper.rb", "Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }\n", before: "RSpec.configure do |config|\n" ) end |
#install_rspec ⇒ Object
5 6 7 |
# File 'lib/flame/generators/testing_generator.rb', line 5 def install_rspec generate("rspec:install") end |
#support_template ⇒ Object
17 18 19 20 21 |
# File 'lib/flame/generators/testing_generator.rb', line 17 def support_template template("spec/support/shoulda_matchers.rb") template("spec/support/factory_bot.rb") template("spec/support/database_cleaner.rb") end |