redding / assert

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

Hidden load errors with Assert and a helper #82

Closed jcredding closed 12 years ago

jcredding commented 13 years ago

@kelredd I've seen a couple of times some weird behavior with assert and helpers files. The repeatable case seems to be screw up your helper file that assert loads with a bad require statement:

# in test/helper.rb
require 'something_that_doesnt_exist' # throws a LoadError

...

and then run the tests. The tests will try to run then break because the helper didn't load. When you look at the top, you don't even see the exception that a file couldn't be loaded as you would expect, so you are really not sure where to go next. I think this is due to how assert loads helper files. Anyway, it can cause some pretty annoying confusion. I'll look into it if I get a chance, just wanted to get it tracked.