fix rubocop warnings

This commit is contained in:
stve 2016-01-14 21:29:42 -05:00
parent 3a0ca00e53
commit 658bd54f49
3 changed files with 11 additions and 6 deletions

View file

@ -12,7 +12,6 @@ module Instapaper
BASE_URL = 'https://www.instapaper.com'
attr_accessor :client, :headers, :multipart, :options, :path,
:rate_limit, :request_method, :uri
alias_method :verb, :request_method
# @param client [Instapaper::Client]
# @param request_method [String, Symbol]

View file

@ -25,7 +25,8 @@ describe Instapaper::Client::Folders do
describe '#add_folder' do
before do
stub_post('/api/1.1/folders/add').with(body: {title: 'Ruby'})
stub_post('/api/1.1/folders/add')
.with(body: {title: 'Ruby'})
.to_return(body: fixture('folders_add.json'), headers: {content_type: 'application/json; charset=utf-8'})
end
@ -43,7 +44,8 @@ describe Instapaper::Client::Folders do
describe '#delete_folder' do
before do
stub_post('/api/1.1/folders/delete'). with(body: {folder_id: '1'})
stub_post('/api/1.1/folders/delete')
.with(body: {folder_id: '1'})
.to_return(body: fixture('folders_delete.json'), headers: {content_type: 'application/json; charset=utf-8'})
end
@ -61,7 +63,8 @@ describe Instapaper::Client::Folders do
describe '#set_order' do
before do
stub_post('/api/1.1/folders/set_order'). with(body: {order: '1121173:2,1121174:1'})
stub_post('/api/1.1/folders/set_order')
.with(body: {order: '1121173:2,1121174:1'})
.to_return(body: fixture('folders_set_order.json'), headers: {content_type: 'application/json; charset=utf-8'})
end

View file

@ -5,9 +5,12 @@ describe Instapaper::Client::OAuth do
describe '#token' do
before do
stub_post('/api/1.1/oauth/access_token').with(body: {x_auth_username: 'ohai', x_auth_password: 'p455w0rd', x_auth_mode: 'client_auth'})
stub_post('/api/1.1/oauth/access_token')
.with(body: {x_auth_username: 'ohai', x_auth_password: 'p455w0rd', x_auth_mode: 'client_auth'})
.to_return(body: fixture('access_token.txt'), headers: {content_type: 'text/plain; charset=utf-8'})
stub_post('/api/1.1/oauth/access_token').with(body: {x_auth_username: 'inval1d', x_auth_password: 'cr3dentials', x_auth_mode: 'client_auth'})
stub_post('/api/1.1/oauth/access_token')
.with(body: {x_auth_username: 'inval1d', x_auth_password: 'cr3dentials', x_auth_mode: 'client_auth'})
.to_return(body: fixture('invalid_credentials.txt'), headers: {content_type: 'text/plain; charset=utf-8'})
end