To see why this attribute is important in the gemspec, see the following links: * #17 * http://www.benjaminfleischer.com/2013/07/12/make-the-world-a-better-place-put-a-license-in-your-gemspec/
When you call the `#callback` matcher and pass an undefined task to the `#before` or `#after` methods of the matcher, this always returns true, even if the `before` callback is not defined in the recipe. This happens because the `configuration` object inside the specs may not have defined the task for the callback. Then, when the matcher method tries to find the task, it always find a `nil` object which always returns true in the capistrano method `#applies_to?`. The `#callback` matcher should check if a capistrano callback has been defined, not if a taks exists, that's why I stub the task if isn't found. That way you can prevent false positives.
This reverts commit 9a61be1.
The combination of #select + #values is clearer than the #reduce method.
With this matcher you can test if a content (i.e, a string) is uploaded to the server. You can also test the path. Example: it "should have put" do @configuration.put 'some: content', '/config.yml' @configuration.should have_put('some: content').to('/config.yml') end