test/recipe_test.rb in fiveruns-dash-ruby-0.8.0 vs test/recipe_test.rb in fiveruns-dash-ruby-0.8.1

- old
+ new

@@ -77,9 +77,23 @@ config.add_recipe :test, :url => 'http://test2.com' assert_equal 1, config.metrics.size assert_metrics(*%w(test2)) end end + context "and passing settings" do + setup do + recipe :settings1, :url => 'http://example.com' do |r| + r.added do |settings| + r.counter(settings[:metric]) { } + end + end + config.add_recipe :settings1, :metric => :bar + end + should "pass them to the `added' block" do + assert_equal 1, config.metrics.size + assert_equal 'bar', config.metrics.first.name + end + end end context "when added" do setup do @fired = false \ No newline at end of file