spec/server_spec.rb in taps2-0.5.5 vs spec/server_spec.rb in taps2-0.6.0
- old
+ new
@@ -11,28 +11,28 @@
before do
Taps::Config.login = 'taps'
Taps::Config.password = 'tpass'
@app = Taps::Server
- @auth_header = "Basic " + ["taps:tpass"].pack("m*")
+ @auth_header = 'Basic ' + ['taps:tpass'].pack('m*')
end
- it "asks for http basic authentication" do
+ it 'asks for http basic authentication' do
get '/'
last_response.status.should == 401
end
- it "verifies the client taps version" do
- get('/', { }, { 'HTTP_AUTHORIZATION' => @auth_header, 'HTTP_TAPS_VERSION' => Taps.version })
+ it 'verifies the client taps version' do
+ get('/', {}, 'HTTP_AUTHORIZATION' => @auth_header, 'HTTP_TAPS_VERSION' => Taps.version)
last_response.status.should == 200
end
it "yells loudly if the client taps version doesn't match" do
- get('/', { }, { 'HTTP_AUTHORIZATION' => @auth_header, 'HTTP_TAPS_VERSION' => '0.0.1' })
+ get('/', {}, 'HTTP_AUTHORIZATION' => @auth_header, 'HTTP_TAPS_VERSION' => '0.0.1')
last_response.status.should == 417
end
- it "allows healthcheck to be accessed w/o HTTP_TAPS_VERSION" do
- get('/health', { }, { 'HTTP_AUTHORIZATION' => @auth_header })
+ it 'allows healthcheck to be accessed w/o HTTP_TAPS_VERSION' do
+ get('/health', {}, 'HTTP_AUTHORIZATION' => @auth_header)
last_response.status.should == 200
end
end