-
Notifications
You must be signed in to change notification settings - Fork 25
add fields #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
add fields #19
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
module RubyStackoverflow | ||
class Configuration | ||
attr_accessor :client_id, :client_sceret , :client_key, :access_token, :api_url | ||
attr_accessor :client_id, :client_secret , :client_key, :access_token, :api_url | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [84/80] |
||
|
||
def self.api_url | ||
'https://api.stackexchange.com/2.2/' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'spec_helper' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
require 'json' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
|
||
module RubyStackoverflow | ||
describe Client::ResponseData do | ||
it 'should response data fields' do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
data = JSON.parse(fixture("users.json").read, {:symbolize_names => true}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant curly braces around a hash parameter. |
||
response = Client::ResponseData.new(data, 'user') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
expect(response.data.count).to eq(1) | ||
expect(response.raw_data.count).to eq(1) | ||
expect(response.quota_max).to eq(10000) | ||
expect(response.quota_remaining).to eq(9996) | ||
expect(response.backoff).to be_nil | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [101/80]