lib/restpack_service/support/matchers.rb in restpack_service-0.0.67 vs lib/restpack_service/support/matchers.rb in restpack_service-0.0.68

- old
+ new

@@ -31,5 +31,20 @@ map.each do |value, expected| service_request_with(param, value) { |r| r[param].should == expected } end end end + +def it_is(status) + it "is :#{status}" do + expect(response.success?).to eq(false) + expect(response.result).to eq({}) + expect(response.status).to eq(:forbidden) + end +end + +def it_succeeds(message='succeeds', &block) + it message do + expect(response.success?).to eq(true) + instance_eval(&block) + end +end