Permalink
Browse files

Distinguish test for 1.8.6 compat

  • Loading branch information...
1 parent c519215 commit c55cdd816c9067fd22497c94f598c7a8a59b7f49 @jeremy jeremy committed Apr 16, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/test/core_ext/string_ext_test.rb
@@ -177,7 +177,7 @@ def test_starts_ends_with_alias
s = "hello"
assert s.starts_with?('h')
assert s.starts_with?('hel')
- assert !s.starts_with?(:hel)
+ assert !s.starts_with?(:hel) if :hel.respond_to?(:length)
assert !s.starts_with?('el')
assert s.start_with?('h')
@@ -186,7 +186,7 @@ def test_starts_ends_with_alias
assert s.ends_with?('o')
assert s.ends_with?('lo')
- assert !s.ends_with?(:lo)
+ assert !s.ends_with?(:lo) if :lo.respond_to?(:length)
assert !s.ends_with?('el')
assert s.end_with?('o')

0 comments on commit c55cdd8

Please sign in to comment.