Sha256: 3037ee8d4c9b626b2c7be2d06fa57adc824b5a8f0c998270cff84988a0ea86e8
Contents?: true
Size: 517 Bytes
Versions: 5
Compression:
Stored size: 517 Bytes
Contents
describe UnderOs::HTTP do extend Facon::SpecHelpers before do @url = 'http://test.com' @req = mock 'request', send: :request end %w[get post put patch head delete].each do |method| describe ".#{method}" do it "sends a #{method.upcase} request" do UnderOs::HTTP::Request.should.receive(:new) .with(@url, foo: 'bar', method: method.to_sym) .and_return(@req) UnderOs::HTTP.__send__(method, @url, foo: 'bar').should == :request end end end end
Version data entries
5 entries across 5 versions & 2 rubygems