recipes/testing.rb in rails_apps_composer-2.2.9 vs recipes/testing.rb in rails_apps_composer-2.2.10

- old
+ new

@@ -6,18 +6,16 @@ ### RSPEC ### if prefer :unit_test, 'rspec' say_wizard "recipe installing RSpec" generate 'rspec:install' copy_from_repo 'spec/spec_helper.rb', :repo => 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/' - unless prefer :email, 'none' - generate 'email_spec:steps' - inject_into_file 'spec/spec_helper.rb', "require 'email_spec'\n", :after => "require 'rspec/rails'\n" - inject_into_file 'spec/spec_helper.rb', :after => "RSpec.configure do |config|\n" do <<-RUBY + generate 'email_spec:steps' + inject_into_file 'spec/spec_helper.rb', "require 'email_spec'\n", :after => "require 'rspec/rails'\n" + inject_into_file 'spec/spec_helper.rb', :after => "RSpec.configure do |config|\n" do <<-RUBY config.include(EmailSpec::Helpers) config.include(EmailSpec::Matchers) RUBY - end end run 'rm -rf test/' # Removing test folder (not needed for RSpec) inject_into_file 'config/application.rb', :after => "Rails::Application\n" do <<-RUBY # don't generate RSpec tests for views and helpers @@ -62,15 +60,13 @@ if prefer :integration, 'cucumber' say_wizard "recipe installing Cucumber" generate "cucumber:install --capybara#{' --rspec' if prefer :unit_test, 'rspec'}#{' -D' if prefer :orm, 'mongoid'}" # make it easy to run Cucumber for single features without adding "--require features" to the command line gsub_file 'config/cucumber.yml', /std_opts = "/, 'std_opts = "-r features/support/ -r features/step_definitions ' - unless prefer :email, 'none' - create_file 'features/support/email_spec.rb' do <<-RUBY + create_file 'features/support/email_spec.rb' do <<-RUBY require 'email_spec/cucumber' RUBY - end end ## CUCUMBER AND MONGOID if prefer :orm, 'mongoid' gsub_file 'features/support/env.rb', /transaction/, "truncation" inject_into_file 'features/support/env.rb', :after => 'begin' do @@ -88,12 +84,12 @@ if prefer :fixtures, 'machinist' say_wizard "generating blueprints file for 'machinist'" generate 'machinist:install' end ### GIT ### - git :add => '.' if prefer :git, true - git :commit => "-aqm 'rails_apps_composer: testing framework'" if prefer :git, true + git :add => '-A' if prefer :git, true + git :commit => "-qm 'rails_apps_composer: testing framework'" if prefer :git, true end # after_bundler after_everything do say_wizard "recipe running after everything" ### RSPEC ### @@ -146,12 +142,12 @@ copy_from_repo 'spec/controllers/home_controller_spec.rb', :repo => repo copy_from_repo 'spec/controllers/users_controller_spec.rb', :repo => repo copy_from_repo 'spec/models/user_spec.rb', :repo => repo end ## GIT - git :add => '.' if prefer :git, true - git :commit => "-aqm 'rails_apps_composer: rspec files'" if prefer :git, true + git :add => '-A' if prefer :git, true + git :commit => "-qm 'rails_apps_composer: rspec files'" if prefer :git, true end ### CUCUMBER ### if prefer :integration, 'cucumber' ## CUCUMBER AND DEVISE (USERS APP) if (prefer :authentication, 'devise') && (prefer :starter_app, 'users_app') @@ -216,11 +212,11 @@ copy_from_repo 'features/users/user_show.feature', :repo => repo copy_from_repo 'features/step_definitions/user_steps.rb', :repo => repo copy_from_repo 'features/support/paths.rb', :repo => repo end ## GIT - git :add => '.' if prefer :git, true - git :commit => "-aqm 'rails_apps_composer: cucumber files'" if prefer :git, true + git :add => '-A' if prefer :git, true + git :commit => "-qm 'rails_apps_composer: cucumber files'" if prefer :git, true end end # after_everything __END__