diff options
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 5 | ||||
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 59212d4f58..26e912fd9e 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -89,7 +89,7 @@ class AppGeneratorTest < Rails::Generators::TestCase output = Dir.chdir(app_root) do `rails new --help` end - assert_match /rails new APP_PATH \[options\]/, output + assert_match(/rails new APP_PATH \[options\]/, output) assert_equal true, $?.success? end @@ -378,9 +378,8 @@ class AppGeneratorTest < Rails::Generators::TestCase end def test_humans_txt_file - date = Date.today.strftime("%B %d, %Y") run_generator [File.join(destination_root, 'things-43')] - assert_file "things-43/public/humans.txt", /Name: Things43/, /Software: Ruby on Rails/, /Date Created: #{date}/ + assert_file "things-43/public/humans.txt", /Name: Things43/, /Software: Ruby on Rails/ end protected diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 51374e5f3f..b0e1865b26 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -99,7 +99,13 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase end def test_generation_runs_bundle_install_with_full_and_mountable - result = run_generator [destination_root, "--mountable", "--full"] + result = run_generator [destination_root, "--mountable", "--full", "--dev"] + assert_file "#{destination_root}/Gemfile.lock" do |contents| + assert_match(/bukkits/, contents) + end + assert_match(/run bundle install/, result) + assert_match(/Using bukkits \(0\.0\.1\)/, result) + assert_match(/Your bundle is complete/, result) assert_equal 1, result.scan("Your bundle is complete").size end @@ -348,4 +354,3 @@ protected silence(:stdout){ generator.send(*args, &block) } end end - |