Reputation: 10287
I'm brand new to Ruby testing and Google isn't helping.
Using Test/Unit, how can I print an instance variable, like
test "thing to happen" do do_stuff assert_equal "foo", @variable p @varible end
Upvotes: 0
Views: 1327
Reputation: 2023
Ruby asserts can output messages to test runner console:
test "thing to happen" do do_stuff assert_equal "foo", @variable, "@variable is #{@variable} when: things to happen" p @varible end
Upvotes: 1