Module: Generapp::Actions::Test
- Included in:
- Generapp::AppBuilder
- Defined in:
- lib/generapp/actions/test.rb
Overview
App test environment associated actions
Instance Method Summary collapse
- #configure_ci ⇒ Object
- #configure_coverage ⇒ Object
- #configure_rspec ⇒ Object
- #enable_database_cleaner ⇒ Object
- #enable_devise_tests ⇒ Object
- #generate_rspec ⇒ Object
- #provide_shoulda_matchers_config ⇒ Object
- #spec_folders ⇒ Object
Instance Method Details
#configure_ci ⇒ Object
46 47 48 |
# File 'lib/generapp/actions/test.rb', line 46 def configure_ci copy_file 'circle.yml', 'circle.yml' end |
#configure_coverage ⇒ Object
42 43 44 |
# File 'lib/generapp/actions/test.rb', line 42 def configure_coverage copy_file 'simplecov', '.simplecov' end |
#configure_rspec ⇒ Object
11 12 13 14 15 |
# File 'lib/generapp/actions/test.rb', line 11 def configure_rspec remove_file 'spec/rails_helper.rb' copy_file 'spec/rails_helper.rb', 'spec/rails_helper.rb' end |
#enable_database_cleaner ⇒ Object
17 18 19 20 |
# File 'lib/generapp/actions/test.rb', line 17 def enable_database_cleaner copy_file 'spec/database_cleaner.rb', 'spec/support/database_cleaner.rb' end |
#enable_devise_tests ⇒ Object
22 23 24 25 |
# File 'lib/generapp/actions/test.rb', line 22 def enable_devise_tests copy_file 'spec/devise.rb', 'spec/support/devise.rb' end |
#generate_rspec ⇒ Object
7 8 9 |
# File 'lib/generapp/actions/test.rb', line 7 def generate_rspec generate 'rspec:install' end |
#provide_shoulda_matchers_config ⇒ Object
27 28 29 30 |
# File 'lib/generapp/actions/test.rb', line 27 def provide_shoulda_matchers_config copy_file 'spec/shoulda_matchers_config.rb', 'spec/support/shoulda_matchers.rb' end |
#spec_folders ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/generapp/actions/test.rb', line 32 def spec_folders %w(spec/lib spec/controllers spec/helpers spec/support/matchers spec/support/mixins spec/support/shared_examples).each do |dir| empty_directory_with_keep_file dir end end |