aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-02-24 09:43:30 +0100
committerYves Senn <yves.senn@gmail.com>2014-02-24 09:45:24 +0100
commit174c9f0df39cd338a4871f82794256cc64f68a81 (patch)
treea972108665c6cace3851753974c643baf43282c9 /railties/test
parent0e144bebc6d979780c3243537673ff553ffb37f5 (diff)
downloadrails-174c9f0df39cd338a4871f82794256cc64f68a81.tar.gz
rails-174c9f0df39cd338a4871f82794256cc64f68a81.tar.bz2
rails-174c9f0df39cd338a4871f82794256cc64f68a81.zip
include names in model generator warning message. refs #13515.
This is a follow up to #13515. It includes the name given and the singularized version in the warning message. This will aide the user to see wether the detected singular was right or not.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/model_generator_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/test/generators/model_generator_test.rb b/railties/test/generators/model_generator_test.rb
index cf307d23e1..bdf51b457c 100644
--- a/railties/test/generators/model_generator_test.rb
+++ b/railties/test/generators/model_generator_test.rb
@@ -38,7 +38,7 @@ class ModelGeneratorTest < Rails::Generators::TestCase
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_match(/Plural version of the model detected, using singularized version. Override with --force-plural or setup custom inflection rules for this noun before running the generator./, content)
+ assert_match(/The model name 'accounts' was recognized as a plural, using the singular 'account'\. Override with --force-plural or setup custom inflection rules for this noun before running the generator\./, content)
end
def test_model_with_underscored_parent_option