Sha256: 93892c7378217651286c5b9da53eb8748279d37dd4fe433ad7b49d76e4a4cd6f
Contents?: true
Size: 545 Bytes
Versions: 28
Compression:
Stored size: 545 Bytes
Contents
require 'spec_helper' require 'webmock/rspec' describe 'post' do it 'should allow testing on post requests' do mock_post('simple_post') post '/simple_post', {} expect_json_types(status: :string, someNumber: :int) end it 'should allow testing on post requests' do url = 'http://www.example.com/simple_post' stub_request(:post, url) post '/simple_post', 'hello', content_type: 'text/plain' expect(WebMock).to have_requested(:post, url).with(body: 'hello', headers: { 'Content-Type' => 'text/plain' }) end end
Version data entries
28 entries across 28 versions & 2 rubygems