redding / assert

Assertion style testing framework.
https://github.com/redding/assert
MIT License
10 stars 1 forks source link

fixes to get the test suite passing in ree, mri, and rbx. #183

Closed kellyredding closed 10 years ago

kellyredding commented 10 years ago

In rbx/mri, structs don't output hex id information in their inspects, so I switched to using an anonymous class for the test to obfuscate hex obj ids in show output for diffs.

I switched to making the protected context setup dsl methods public. This is because mri/rbx require pass true as the second arg if testing responds to on private/protected methods. There really isn't any value in these singleton methods being protected and I'm testing and using them in tests as if they are public anyway.

Overall, this gets the gem's test suite passing on these ruby versions:

Closes #182.

@jcredding ready for review.

kellyredding commented 10 years ago

@jcredding you cool with me just making all those protected methods public?

jcredding commented 10 years ago

@kellyredding - Looks good to me :boom:

I'm cool with making the methods public. For an Assert::Context whether the method is public/protected/private doesn't really change the interface. Since when writing tests, the entire class is the interface. No matter the visibility of the method, I still can't define a run_setups method, or I will probably break assert.