Closed cbarton closed 13 years ago
Thanks for the pull request. @leshill and I will take a look this Friday afternoon.
Can't you use rspec's before and after hooks?
How does Lane's formatter relate to your original "before_test" pull request? What benefits does this new formatter present?
This is true.. good point sir. And sorry about the bad merge, meant for it to be another branch.
The major difference is that your before_test hook gets run before each file, rather than before each spec. However, I think it's a good idea for your test suite to be able to run independently of specjour, which is why I recommend using rspec's hooks.
For specific cases, there might be some caching issues when a test is run, for example in our application we use fixture data and transactional fixtures. After a test runs there is a chance that the global fixtures recognize the fixtures as in the database when they are not due to the natural parallelism experienced. With this in mind, before each test we must clear out the fixture cache that active record creates.
Enter the before_test hook where we can specify to clean out the cache and it works!