spec/integration/jsonp_spec.rb in goliath-1.0.5 vs spec/integration/jsonp_spec.rb in goliath-1.0.6

- old
+ new

@@ -28,27 +28,27 @@ let(:query) { {} } it 'does not alter the content type' do with_api(JSON_API) do get_request({ query: query }, err) do |c| - c.response_header['CONTENT_TYPE'].should =~ %r{^application/json} + expect(c.response_header['CONTENT_TYPE']).to match(%r{^application/json}) end end end it 'does not alter the content length' do with_api(JSON_API) do get_request({ query: query }, err) do |c| - c.response_header['CONTENT_LENGTH'].to_i.should == 2 + expect(c.response_header['CONTENT_LENGTH'].to_i).to eq(2) end end end it 'does not wrap the response with anything' do with_api(JSON_API) do get_request({ query: query }, err) do |c| - c.response.should == 'OK' + expect(c.response).to eq('OK') end end end end @@ -56,26 +56,26 @@ let(:query) { { callback: 'test' } } it 'adjusts the content type' do with_api(JSON_API) do get_request({ query: query }, err) do |c| - c.response_header['CONTENT_TYPE'].should =~ %r{^application/javascript} + expect(c.response_header['CONTENT_TYPE']).to match(%r{^application/javascript}) end end end it 'adjusts the content length' do with_api(JSON_API) do get_request({ query: query }, err) do |c| - c.response_header['CONTENT_LENGTH'].to_i.should == 8 + expect(c.response_header['CONTENT_LENGTH'].to_i).to eq(8) end end end it 'wraps response with callback' do with_api(JSON_API) do get_request({ query: query }, err) do |c| - c.response.should =~ /^test\(.*\)$/ + expect(c.response).to match(/^test\(.*\)$/) end end end end end