Sha256: b92a4029027fdd57161115f19dc67fa7247b46e6f82c660c41ad931ffe0a6a77

Contents?: true

Size: 736 Bytes

Versions: 4

Compression:

Stored size: 736 Bytes

Contents

require 'spec_helper'

describe Bitcoin::API do
  subject { Bitcoin::API.new(:user => $user, :pass => $pass) }
  
  it "should have default host, port, ssl" do
    subject.host.should == 'localhost'
    subject.port.should == 8332
    subject.ssl?.should be_false
  end
  
  it "should accept host, port, ssl options" do
    req = Bitcoin::API.new(:user => $user, :pass => $pass, :host => 'example.com', :port => 1234, :ssl => true)
    req.host.should == 'example.com'
    req.port.should == 1234
    req.ssl?.should be_true
  end
  
  it "should build an options hash" do
    subject.to_hash.should == {
      :user => $user,
      :pass => $pass,
      :host => 'localhost',
      :port => 8332,
      :ssl => false,
    }
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

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