spec/rflow/components/http/extensions/extensions_spec.rb in rflow-components-http-1.0.0a3 vs spec/rflow/components/http/extensions/extensions_spec.rb in rflow-components-http-1.0.0a4

- old
+ new

@@ -4,35 +4,35 @@ module Components module HTTP module Extensions describe HTTPRequestExtension do it "should work" do - Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Request'].should include(described_class) + expect(Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Request']).to include(described_class) Message.new('RFlow::Message::Data::HTTP::Request').data.tap do |d| - d.uri.should == '/' - d.method.should == 'GET' - d.query_string.should == nil - d.protocol.should == 'HTTP/1.0' - d.headers.should == {} + expect(d.uri).to eq('/') + expect(d.method).to eq('GET') + expect(d.query_string).to be_nil + expect(d.protocol).to eq('HTTP/1.0') + expect(d.headers).to eq({}) d.uri = '/foo' - d.uri.should == '/foo' + expect(d.uri).to eq('/foo') end end end describe HTTPResponseExtension do it "should work" do - Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Response'].should include(described_class) + expect(Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Response']).to include(described_class) Message.new('RFlow::Message::Data::HTTP::Response').data.tap do |d| - d.protocol.should == 'HTTP/1.0' - d.status_code.should == 200 - d.status_reason_phrase.should == 'OK' - d.headers.should == {} - d.content.should == '' + expect(d.protocol).to eq('HTTP/1.0') + expect(d.status_code).to eq(200) + expect(d.status_reason_phrase).to eq('OK') + expect(d.headers).to eq({}) + expect(d.content).to eq('') d.status_code = 404 - d.status_code.should == 404 + expect(d.status_code).to eq(404) end end end end end