diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-05-18 09:27:48 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-05-18 09:27:48 +0000 |
commit | 61dfab12fd72aa3546746a8354476a9572e0bf23 (patch) | |
tree | 34144ee44e11a58c360a00f07dd32e36846c6d95 /test/unit/initializers | |
parent | 474c01074638e46c505dc826c0d631980093f145 (diff) | |
download | redmine-61dfab12fd72aa3546746a8354476a9572e0bf23.tar.gz redmine-61dfab12fd72aa3546746a8354476a9572e0bf23.zip |
Removed some shoulda context.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11865 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/initializers')
-rw-r--r-- | test/unit/initializers/patches_test.rb | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/test/unit/initializers/patches_test.rb b/test/unit/initializers/patches_test.rb index 1fc234d70..f46c905e1 100644 --- a/test/unit/initializers/patches_test.rb +++ b/test/unit/initializers/patches_test.rb @@ -20,21 +20,19 @@ require File.expand_path('../../../test_helper', __FILE__) class PatchesTest < ActiveSupport::TestCase include Redmine::I18n - context "ActiveRecord::Base.human_attribute_name" do - setup do - Setting.default_language = 'en' - end + def setup + Setting.default_language = 'en' + end - should "transform name to field_name" do - assert_equal l('field_last_login_on'), ActiveRecord::Base.human_attribute_name('last_login_on') - end + test "ActiveRecord::Base.human_attribute_name should transform name to field_name" do + assert_equal l('field_last_login_on'), ActiveRecord::Base.human_attribute_name('last_login_on') + end - should "cut extra _id suffix for better validation" do - assert_equal l('field_last_login_on'), ActiveRecord::Base.human_attribute_name('last_login_on_id') - end + test "ActiveRecord::Base.human_attribute_name should cut extra _id suffix for better validation" do + assert_equal l('field_last_login_on'), ActiveRecord::Base.human_attribute_name('last_login_on_id') + end - should "default to humanized value if no translation has been found (useful for custom fields)" do - assert_equal 'Patch name', ActiveRecord::Base.human_attribute_name('Patch name') - end + test "ActiveRecord::Base.human_attribute_name should default to humanized value if no translation has been found (useful for custom fields)" do + assert_equal 'Patch name', ActiveRecord::Base.human_attribute_name('Patch name') end end |