lib/restpack_service/support/matchers.rb in restpack_service-0.0.72 vs lib/restpack_service/support/matchers.rb in restpack_service-0.0.73

- old
+ new

@@ -32,14 +32,15 @@ service_request_with(param, value) { |r| r[param].should == expected } end end end -def it_fails_with(status) +def it_fails_with(status, &block) it "fails with :#{status}" do expect(response.success?).to eq(false) expect(response.result).to eq({}) expect(response.status).to eq(:forbidden) + instance_eval(&block) if block_given? end end def it_succeeds(message='succeeds', &block) it message do