aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/resource_generator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/resource_generator_test.rb')
-rw-r--r--railties/test/generators/resource_generator_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/test/generators/resource_generator_test.rb b/railties/test/generators/resource_generator_test.rb
index 79fd081018..96fd7a0a72 100644
--- a/railties/test/generators/resource_generator_test.rb
+++ b/railties/test/generators/resource_generator_test.rb
@@ -18,7 +18,7 @@ class ResourceGeneratorTest < Rails::Generators::TestCase
%w(
app/models/account.rb
- test/models/account_test.rb
+ test/unit/account_test.rb
test/fixtures/accounts.yml
).each { |path| assert_file path }
@@ -33,10 +33,10 @@ class ResourceGeneratorTest < Rails::Generators::TestCase
def test_resource_controller_with_pluralized_class_name
run_generator
assert_file "app/controllers/accounts_controller.rb", /class AccountsController < ApplicationController/
- assert_file "test/controllers/accounts_controller_test.rb", /class AccountsControllerTest < ActionController::TestCase/
+ assert_file "test/functional/accounts_controller_test.rb", /class AccountsControllerTest < ActionController::TestCase/
assert_file "app/helpers/accounts_helper.rb", /module AccountsHelper/
- assert_file "test/helpers/accounts_helper_test.rb", /class AccountsHelperTest < ActionView::TestCase/
+ assert_file "test/unit/helpers/accounts_helper_test.rb", /class AccountsHelperTest < ActionView::TestCase/
end
def test_resource_controller_with_actions
@@ -70,14 +70,14 @@ class ResourceGeneratorTest < Rails::Generators::TestCase
def test_plural_names_are_singularized
content = run_generator ["accounts".freeze]
assert_file "app/models/account.rb", /class Account < ActiveRecord::Base/
- assert_file "test/models/account_test.rb", /class AccountTest/
+ assert_file "test/unit/account_test.rb", /class AccountTest/
assert_match /Plural version of the model detected, using singularized version. Override with --force-plural./, content
end
def test_plural_names_can_be_forced
content = run_generator ["accounts", "--force-plural"]
assert_file "app/models/accounts.rb", /class Accounts < ActiveRecord::Base/
- assert_file "test/models/accounts_test.rb", /class AccountsTest/
+ assert_file "test/unit/accounts_test.rb", /class AccountsTest/
assert_no_match /Plural version of the model detected/, content
end