Skip to content

Commit

Permalink
MissingConfigExecption => MissingConfigExeception
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelp committed Sep 26, 2013
1 parent 68005ff commit 7988e42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Bitstamp.setup do |config|
end
```

If you fail to set your `key` or `secret` a `MissingConfigExecption`
If you fail to set your `key` or `secret` a `MissingConfigExeception`
will be raised.

## Bitstamp ticker
Expand Down
4 changes: 2 additions & 2 deletions lib/bitstamp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def self.setup

def self.sanity_check!
unless self.key || self.secret
raise MissingConfigExecption.new("Bitstamp Gem not properly configured")
raise MissingConfigExeception.new("Bitstamp Gem not properly configured")
end
end

class MissingConfigExecption<Exception;end;
class MissingConfigExeception<Exception;end;
end
11 changes: 8 additions & 3 deletions spec/bitstamp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@
end

describe :balance, vcr: {cassette_name: 'bitstamp/balance'} do
before { setup_bitstamp }
subject { Bitstamp.balance }
it { should == {"btc_reserved"=>"0", "fee"=>"0.4000", "btc_available"=>"0", "usd_reserved"=>"0", "btc_balance"=>"0", "usd_balance"=>"6953.07", "usd_available"=>"6953.07"} }
context "configured" do
subject { Bitstamp.balance }
before { setup_bitstamp }
it { should == {"btc_reserved"=>"0", "fee"=>"0.4000", "btc_available"=>"0", "usd_reserved"=>"0", "btc_balance"=>"0", "usd_balance"=>"6953.07", "usd_available"=>"6953.07"} }
end
context "not configured" do
it { expect { Bitstamp.balance }.to raise_exception(Bitstamp::MissingConfigExeception, "Bitstamp Gem not properly configured") }
end
end

describe :order_book, vcr: {cassette_name: 'bitstamp/order_book'} do
Expand Down

0 comments on commit 7988e42

Please sign in to comment.