Skip to content

Commit

Permalink
Enforce leading dot cop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Aug 25, 2014
1 parent a14ba84 commit 0b5d232
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Style/Documentation:
Enabled: false

Style/DotPosition:
EnforcedStyle: trailing
EnforcedStyle: leading

Style/DoubleNegation:
Enabled: false
Expand Down
8 changes: 4 additions & 4 deletions spec/http/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def simple_response(body, status = 200)
'http://example.com/' => redirect_response('/')
)

expect { client.get('http://example.com/') }.
to raise_error(HTTP::Redirector::EndlessRedirectError)
expect { client.get('http://example.com/') }
.to raise_error(HTTP::Redirector::EndlessRedirectError)
end

it 'fails if max amount of hops reached' do
Expand All @@ -64,8 +64,8 @@ def simple_response(body, status = 200)
'http://example.com/6' => simple_response('OK')
)

expect { client.get('http://example.com/') }.
to raise_error(HTTP::Redirector::TooManyRedirectsError)
expect { client.get('http://example.com/') }
.to raise_error(HTTP::Redirector::TooManyRedirectsError)
end
end

Expand Down
3 changes: 2 additions & 1 deletion spec/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@

it 'sets Authorization header with proper BasicAuth value' do
client = HTTP.basic_auth :user => 'foo', :pass => 'bar'
expect(client.default_headers[:authorization]).to match(/^Basic [A-Za-z0-9+\/]+=*$/)
expect(client.default_headers[:authorization])
.to match(/^Basic [A-Za-z0-9+\/]+=*$/)
end
end
end

0 comments on commit 0b5d232

Please sign in to comment.