Closed kellyredding closed 10 years ago
@jcredding so I am an idiot and this assertion won't work. See below:
# irb
>> Poop
NameError: uninitialized constant Poop
>> def assert_defined(thing); puts defined?(thing).inspect; end
=> nil
>> assert_defined 1
"local-variable"
=> nil
>> assert_defined Poop
NameError: uninitialized constant Poop
You can't pass something undefined to assert_defined
method without getting a NameError
(duh!).
for asserting things are defined; use `defined?(...)'; show detailed fail message