Sha256: a882548bcafb1391236310b2152c774b592acbc989026e76865d942b008b2a28

Contents?: true

Size: 595 Bytes

Versions: 4

Compression:

Stored size: 595 Bytes

Contents

require 'spec_helper'

describe Bitcoin do
  before :each do
    FakeWeb.register_uri(:post, "http://user:pass@localhost:8332", :response => fixture('getbalance'))
  end
  
  it "as a function" do
    cli = Bitcoin($user, $pass)
    cli.balance.should == 0.001
  end
  
  it "DSL, included" do
    class << self
      include Bitcoin
    end
    
    username $user
    password $pass
    
    balance.should == 0.001
  end
  
  it "DSL, extended" do
    class << self
      include Bitcoin
      
      username $user
      password $pass
      
      balance.should == 0.001
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
bitcoin-client-0.0.3 spec/lib/bitcoin_spec.rb
bitcoin-client-0.0.2 spec/lib/bitcoin_spec.rb
ramontayag-bitcoin-client-0.1.0 spec/lib/bitcoin_spec.rb
bitcoin-client-0.0.1 spec/lib/bitcoin_spec.rb