P
Patrick Gundlach
Hi,
given the following program:
--------------------------------------------------
#!/opt/ruby/1.8/bin/ruby -w
require 'test/unit'
class FooTester < Test::Unit::TestCase
def setup
@foo=Array.new
@foo << [:a,:b,[:c]]
end
def test_foo
assert_instance_of Hash,@foo
end
end
--------------------------------------------------
I'd like to have the
" 1) Failure:
test_foo(FooTester) [-:16]:
<[[:a, :b, [:c]]]> expected to be an instance of
<Hash> but was
<Array>."
written a bit shorter, perhaps like this:
" 1) Failure:
test_foo(FooTester) [-:16]:
instance of <Hash> expected but was <Array>."
because sometimes I have very large objects to compare. I was not
successful by setting use_pp=false, somehow there is no difference
between those two (with and w/o use_pp=false).
Patrick
given the following program:
--------------------------------------------------
#!/opt/ruby/1.8/bin/ruby -w
require 'test/unit'
class FooTester < Test::Unit::TestCase
def setup
@foo=Array.new
@foo << [:a,:b,[:c]]
end
def test_foo
assert_instance_of Hash,@foo
end
end
--------------------------------------------------
I'd like to have the
" 1) Failure:
test_foo(FooTester) [-:16]:
<[[:a, :b, [:c]]]> expected to be an instance of
<Hash> but was
<Array>."
written a bit shorter, perhaps like this:
" 1) Failure:
test_foo(FooTester) [-:16]:
instance of <Hash> expected but was <Array>."
because sometimes I have very large objects to compare. I was not
successful by setting use_pp=false, somehow there is no difference
between those two (with and w/o use_pp=false).
Patrick