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

- old
+ new

@@ -8,30 +8,30 @@ it 'returns the echo param' do with_api(Echo) do get_request({:query => {:echo => 'test'}}, err) do |c| b = MultiJson.load(c.response) - b['response'].should == 'test' + expect(b['response']).to eq('test') end end end it 'returns error without echo' do with_api(Echo) do get_request({}, err) do |c| b = MultiJson.load(c.response) - b['error'].should_not be_nil - b['error'].should == 'echo identifier missing' + expect(b['error']).not_to be_nil + expect(b['error']).to eq('echo identifier missing') end end end it 'echos POST data' do with_api(Echo) do post_request({:body => {'echo' => 'test'}}, err) do |c| b = MultiJson.load(c.response) - b['response'].should == 'test' + expect(b['response']).to eq('test') end end end it 'echos POST data that is multipart encoded' do @@ -40,11 +40,11 @@ head = {'content-type' => "multipart/form-data; boundary=#{body.boundary}"} post_request({:body => body.to_s, :head => head}, err) do |c| b = MultiJson.load(c.response) - b['response'].should == 'test' + expect(b['response']).to eq('test') end end end it 'echos application/json POST body data' do @@ -53,19 +53,19 @@ head = {'content-type' => 'application/json'} post_request({:body => body.to_s, :head => head}, err) do |c| b = MultiJson.load(c.response) - b['response'].should == 'My Echo' + expect(b['response']).to eq('My Echo') end end end it 'echos PATCH data' do with_api(Echo) do patch_request({:body => {'echo' => 'test'}}, err) do |c| b = MultiJson.load(c.response) - b['response'].should == 'test' + expect(b['response']).to eq('test') end end end end