summaryrefslogtreecommitdiffstats
path: root/test/unit/custom_field_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-05 11:03:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-05 11:03:26 +0000
commitaa9238912b97ae5d3e508294fb9cf9178c484b4a (patch)
tree4c396ab656d4f05783ea8b1062ba6ef48d08b561 /test/unit/custom_field_test.rb
parent97ca65d1b217068198e9f66d1dbc5e8e7db93b38 (diff)
downloadredmine-aa9238912b97ae5d3e508294fb9cf9178c484b4a.tar.gz
redmine-aa9238912b97ae5d3e508294fb9cf9178c484b4a.zip
Changed assertions to make them work with Rails2/3 ruby1.8/1.9 different behaviours.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9108 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/custom_field_test.rb')
-rw-r--r--test/unit/custom_field_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/custom_field_test.rb b/test/unit/custom_field_test.rb
index db7a637fd..529aa699d 100644
--- a/test/unit/custom_field_test.rb
+++ b/test/unit/custom_field_test.rb
@@ -38,8 +38,8 @@ class CustomFieldTest < ActiveSupport::TestCase
def test_regexp_validation
field = IssueCustomField.new(:name => 'regexp', :field_format => 'text', :regexp => '[a-z0-9')
assert !field.save
- assert_equal I18n.t('activerecord.errors.messages.invalid'),
- field.errors[:regexp].to_s
+ assert_include I18n.t('activerecord.errors.messages.invalid'),
+ field.errors[:regexp]
field.regexp = '[a-z0-9]'
assert field.save
end