aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/base_test.rb')
-rwxr-xr-xactiverecord/test/base_test.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index 7ea21156f1..5f8f1537d9 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -1229,19 +1229,21 @@ class BasicsTest < Test::Unit::TestCase
topic = Topic.create('author_name' => author_name)
assert_equal author_name, Topic.find(topic.id).author_name
end
-
- def test_quote_chars
- str = 'The Narrator'
- topic = Topic.create(:author_name => str)
- assert_equal str, topic.author_name
-
- assert_kind_of ActiveSupport::Multibyte::Chars, str.chars
- topic = Topic.find_by_author_name(str.chars)
-
- assert_kind_of Topic, topic
- assert_equal str, topic.author_name, "The right topic should have been found by name even with name passed as Chars"
+
+ if RUBY_VERSION < '1.9'
+ def test_quote_chars
+ str = 'The Narrator'
+ topic = Topic.create(:author_name => str)
+ assert_equal str, topic.author_name
+
+ assert_kind_of ActiveSupport::Multibyte::Chars, str.chars
+ topic = Topic.find_by_author_name(str.chars)
+
+ assert_kind_of Topic, topic
+ assert_equal str, topic.author_name, "The right topic should have been found by name even with name passed as Chars"
+ end
end
-
+
def test_class_level_destroy
should_be_destroyed_reply = Reply.create("title" => "hello", "content" => "world")
Topic.find(1).replies << should_be_destroyed_reply