test-unit/test-unit-rr

[Q] Example code

hiroyuki-sato opened this issue · 2 comments

Hello

Is this example correct?
Do I need nested assert_rr?

https://github.com/test-unit/test-unit-rr/blob/master/lib/test/unit/rr.rb#L72-L78

assert_rr do
  subject = Object.new
  assert_rr do
    mock(subject).should_be_called
    subject.should_be_called
  end
end

Is this wrong usage?

subject = Object.new
assert_rr do
  mock(subject).should_be_called
  subject.should_be_called
end

Thanks.

kou commented

The example is wrong.
We don't need outer assert_rr.

Thank you for the comment.
I created #5 for fixing this issue.