Week of May 13 - May 19, 2013
The master code is, as one would expect, in upheaval again. This week featured a big rewrite of callback internals, though I haven't sussed out whether it changes any features in that area.
3073c531 adds Minitest 5 compatibility to 4.
Ensure Mockery instance gets reset even if exception raised. Fixes issue #144 .
Adapt Mocha acceptance tests to cope with changes in output from latest (v4.6.2) of MiniTest.
Updates toabout compatibility.
A striking parallel with MiniTest
Another new instance of thesubclass is created. Remember, created one instance of the class for the before :all blocks, but now it's creating a fresh instance for this specific spec to be evaluated against.
Thinking back to how MiniTest works , there's a striking parallel: where MiniTest would instantiate a new instance of the MiniTest::Unit:: for each test method, RSpec is creating a new instance …
MiniTest::Unit, a.a. the "runner"
The call to MiniTest:: Unit.new.run simply calls MiniTest:: Unit.runner. run , passing the command-line arguments through. runner is a class method on MiniTest::Unit , which returns an instance of MiniTest::Unit by default, although it can be configured to return anything else by setting MiniTest:: Unit.runner = <something else> .
So, an instance of MiniTest::Unit was created in the unit test, which then calls run on …
MiniTest for testing
Fat Models, Skinny Controllers
There has been a ‘second default stack' brewing for a while now. I'm going to call this the "Prime stack". This stack's approximate choices are:
for view templates
/ for testing
Skinny models, controllers, and a service layer
But his metaphor breaks down a little, because the second stack isn't really a stack:
A considerable minority …
As mentioned previously, with two noted exceptions, the minitest-chef tests are located in the files/default/tests/minitest directory of the apache2 cookbook. We use minitest-chef-handler RubyGem with minitest-handler cookbook to automatically run tests on the node after the specified configuration has been converged with test-kitchen.
Additionally, some helper methods are in the support directory for minitest-chef to use. This should be required in any …
…] - [regression] provider for resource changes post-10.12.0 breaks node attribute usage in MiniTest::
[ CHEF-3416 ] - Incorrect reference to object.raw data when editing a data bag with print after specified
[ CHEF-3435 ] - deploy resource doesn't create the deploy to or shared path directories
[ CHEF-3443 ] - registration results in an exception, masking the true failure
[ CHEF-3449 ] - …
This is because MiniTest by default runs your tests in random order. This is a good thing because it prevents your tests from accidentally becoming order-dependent due to "state leakage". If you find that your tests are breaking randomly, it is most likely due to this state leakage. You can run your tests with the same seed to reproduce the problem: rake TESTOPTS="--seed=1261"
MiniTest allows you to easily skip tests that are not working with the `skip` …