aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb4
-rw-r--r--railties/test/generators/plugin_generator_test.rb3
-rw-r--r--railties/test/generators/resource_generator_test.rb6
3 files changed, 4 insertions, 9 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 6f0bad06b9..98994f6ad2 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -111,7 +111,7 @@ class AppGeneratorTest < GeneratorsTestCase
def test_rails_is_frozen
generator(:freeze => true, :database => "sqlite3").expects(:run).with("rake rails:freeze:edge", false)
- silence(:stdout){ generator.invoke(:all) }
+ silence(:stdout){ generator.invoke }
assert_file 'config/environment.rb', /# RAILS_GEM_VERSION/
end
@@ -127,7 +127,7 @@ class AppGeneratorTest < GeneratorsTestCase
template.instance_eval "def read; self; end" # Make the string respond to read
generator(:template => path, :database => "sqlite3").expects(:open).with(path).returns(template)
- assert_match /It works!/, silence(:stdout){ generator.invoke(:all) }
+ assert_match /It works!/, silence(:stdout){ generator.invoke }
end
def test_usage_read_from_file
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb
index 9e7b597739..3388b2f6f5 100644
--- a/railties/test/generators/plugin_generator_test.rb
+++ b/railties/test/generators/plugin_generator_test.rb
@@ -22,7 +22,8 @@ class PluginGeneratorTest < GeneratorsTestCase
def test_invokes_default_test_framework
run_generator
- assert_file "vendor/plugins/plugin_fu/test/plugin_fu_test.rb"
+ assert_file "vendor/plugins/plugin_fu/test/plugin_fu_test.rb", /class PluginFuTest < ActiveSupport::TestCase/
+ assert_file "vendor/plugins/plugin_fu/test/test_helper.rb"
end
def test_logs_if_the_test_framework_cannot_be_found
diff --git a/railties/test/generators/resource_generator_test.rb b/railties/test/generators/resource_generator_test.rb
index 3d856f519b..456e6ff3ea 100644
--- a/railties/test/generators/resource_generator_test.rb
+++ b/railties/test/generators/resource_generator_test.rb
@@ -81,12 +81,6 @@ class ResourceGeneratorTest < GeneratorsTestCase
def test_singleton_resource
run_generator ["account", "--singleton"]
- assert_file "app/controllers/account_controller.rb", /class AccountController < ApplicationController/
- assert_file "test/functional/account_controller_test.rb", /class AccountControllerTest < ActionController::TestCase/
-
- assert_file "app/helpers/account_helper.rb", /module AccountHelper/
- assert_file "test/unit/helpers/account_helper_test.rb", /class AccountHelperTest < ActionView::TestCase/
-
assert_file "config/routes.rb" do |route|
assert_match /map\.resource :account$/, route
end