-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RetrieveList specs and update webmock
- Loading branch information
Richard Bates
committed
Feb 11, 2018
1 parent
ef26780
commit 5e8b243
Showing
12 changed files
with
619 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
require 'pry' | ||
|
||
RSpec.describe Hodlmoon::Client::RetrieveList do | ||
describe '#call', :vcr do | ||
subject(:client) { described_class.call(12, currency) } | ||
|
||
context 'with gbp' do | ||
let(:currency) { 'gbp' } | ||
|
||
it 'returns the correct limit' do | ||
expect(client.count).to eq(12) | ||
end | ||
|
||
it 'returns the gbp headers' do | ||
expect(client.first.keys).to include('price_gbp', '24h_volume_gbp', 'market_cap_gbp') | ||
end | ||
end | ||
|
||
context 'with usd' do | ||
let(:currency) { 'usd' } | ||
|
||
it 'returns the correct limit' do | ||
expect(client.count).to eq(12) | ||
end | ||
|
||
it 'returns the usd headers' do | ||
expect(client.first.keys).to include('price_usd', '24h_volume_usd', 'market_cap_usd') | ||
end | ||
end | ||
end | ||
end |
6 changes: 3 additions & 3 deletions
6
spec/client/coin_market_cap_spec.rb → spec/client/retrieve_price_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
156 changes: 156 additions & 0 deletions
156
spec/vcr/Hodlmoon_Client_RetrieveList/_call/with_gbp/returns_the_correct_limit.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.