Permalink
Browse files

Define #inspect instead of #to_s

Ruby 2.0 Object#inspect does not call #to_s by default anymore.
  • Loading branch information...
1 parent b59b72a commit 45e9cac12ca99a51ef10e5ee423a6712818ae145 @sikachu sikachu committed Feb 22, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/test/application/route_inspect_test.rb
@@ -18,7 +18,7 @@ def setup
def test_displaying_routes_for_engines
engine = Class.new(Rails::Engine) do
- def self.to_s
+ def self.inspect
"Blog::Engine"
end
end
@@ -136,7 +136,7 @@ def test_rake_routes_shows_route_with_rack_app
def test_rake_routes_shows_route_with_rack_app_nested_with_dynamic_constraints
constraint = Class.new do
- def to_s
+ def inspect
"( my custom constraint )"
end
end

0 comments on commit 45e9cac

Please sign in to comment.