features/generator_spec.feature in ammeter-1.0.0 vs features/generator_spec.feature in ammeter-1.1.0

- old
+ new

@@ -30,11 +30,11 @@ """ Scenario: A spec that runs the entire generator Given a file named "spec/generators/awesome_generator_spec.rb" with: """ - require "spec_helper" + require "rails_helper" require 'generators/awesome/awesome_generator' describe AwesomeGenerator do before { run_generator %w(my_dir) } describe 'public/my_dir/awesome.html' do @@ -55,11 +55,11 @@ Then the output should contain "6 examples, 0 failures" Scenario: A spec that runs one task in the generator Given a file named "spec/generators/another_awesome_generator_spec.rb" with: """ - require "spec_helper" + require "rails_helper" require 'generators/awesome/awesome_generator' describe AwesomeGenerator do arguments %w(another_dir) @@ -80,11 +80,11 @@ Then the output should contain "4 examples, 0 failures" Scenario: A spec with some failures shows nice error messages Given a file named "spec/generators/awesome_generator_spec.rb" with: """ - require "spec_helper" + require "rails_helper" require 'generators/awesome/awesome_generator' describe AwesomeGenerator do before { run_generator %w(my_dir) } describe 'public/my_dir/awesome.html' do @@ -127,11 +127,11 @@ """ Scenario: Can specify arguments separately from running the generator Given a file named "spec/generators/awesome_generator_spec.rb" with: """ - require "spec_helper" + require "rails_helper" require 'generators/awesome/awesome_generator' describe AwesomeGenerator do arguments %w(my_dir --super) @@ -150,11 +150,11 @@ Then the output should contain "2 examples, 0 failures" Scenario: A generator that creates a migration Given a file named "spec/generators/a_migration_spec.rb" with: """ - require "spec_helper" + require "rails_helper" require 'rails/generators/active_record/migration/migration_generator' describe ActiveRecord::Generators::MigrationGenerator do before { run_generator %w(create_posts) } subject { migration_file('db/migrate/create_posts.rb') } @@ -167,10 +167,10 @@ Then the output should contain "3 examples, 0 failures" Scenario: Can tell the generator where to put its files Given a file named "spec/generators/awesome_generator_spec.rb" with: """ - require "spec_helper" + require "rails_helper" require 'generators/awesome/awesome_generator' describe AwesomeGenerator do destination Rails.root + 'tmp/generated_files'