File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,10 @@ def initialize # :nodoc:
247
247
end
248
248
end
249
249
250
+ def inspect # :nodoc:
251
+ "#<#{ self . class . name } >"
252
+ end
253
+
250
254
def configure ( &block ) # :nodoc:
251
255
instance_eval ( &block )
252
256
end
Original file line number Diff line number Diff line change @@ -224,5 +224,18 @@ class MyTie < Rails::Railtie
224
224
Rails . env = original_env
225
225
assert_equal ( original_env , Rails . env )
226
226
end
227
+
228
+ test "Railtie object isn't output when a NoMethodError is raised" do
229
+ class Foo < Rails ::Railtie
230
+ config . foo = ActiveSupport ::OrderedOptions . new
231
+ config . foo . greetings = "hello"
232
+ end
233
+
234
+ error = assert_raises ( NoMethodError ) do
235
+ Foo . instance . abc
236
+ end
237
+
238
+ assert_equal ( "undefined method `abc' for #<RailtiesTest::RailtieTest::Foo>" , error . original_message )
239
+ end
227
240
end
228
241
end
You can’t perform that action at this time.
0 commit comments