spec/processor/middleware/logger_spec.rb in pupa-0.1.11 vs spec/processor/middleware/logger_spec.rb in pupa-0.2.0
- old
+ new
@@ -25,19 +25,19 @@
before :each do
@response = connection.get('/hello', nil, :accept => 'text/html')
end
it 'should still return output' do
- @response.body.should == 'hello'
+ expect(@response.body).to eq('hello')
end
it 'should log the method and URL' do
- io.string.should match('get http:/hello')
+ expect(io.string).to match('get http:/hello')
end
it 'should log request headers' do
- io.string.should match('Accept: "text/html')
+ expect(io.string).to match('Accept: "text/html')
end
end
context 'with INFO log level' do
let :logger do
@@ -60,28 +60,28 @@
before :each do
connection.get('/hello', nil, :accept => 'text/html')
end
it 'should log the method and URL' do
- io.string.should match('get http:/hello')
+ expect(io.string).to match('get http:/hello')
end
it 'should not log request headers' do
- io.string.should_not match('Accept: "text/html')
+ expect(io.string).not_to match('Accept: "text/html')
end
end
context 'with POST request' do
before :each do
connection.post('/hello', 'foo=bar', :accept => 'text/html')
end
it 'should log the method and URL' do
- io.string.should match('post http:/hello foo=bar')
+ expect(io.string).to match('post http:/hello foo=bar')
end
it 'should not log request headers' do
- io.string.should_not match('Accept: "text/html')
+ expect(io.string).not_to match('Accept: "text/html')
end
end
end
end