Sha256: 909c036b2fab39b909263426a845de3e904476d4327bf61b9a72974ffe673965
Contents?: true
Size: 902 Bytes
Versions: 13
Compression:
Stored size: 902 Bytes
Contents
require 'spec_helper' describe Etherscanio::Call do describe 'initialize' do subject { Etherscanio::Call.new(mod, action) } context 'is a object' do let(:mod) { 'foo' } let(:action) { 'bar' } it { is_expected.to be_a(Object) } end context '.mod' do subject { Etherscanio::Call.new(mod, action).mod } let(:mod) { 'foo' } let(:action) { 'bar' } it { is_expected.to be_a(String) } end context '.action' do subject { Etherscanio::Call.new(mod, action).action } let(:mod) { 'foo' } let(:action) { 'bar' } it { is_expected.to be_a(String) } end context 'to_s' do subject { Etherscanio::Call.new(mod, action).to_s } let(:mod) { 'foo' } let(:action) { 'bar' } let(:uri) { 'http://api.etherscan.io/api?' } it { is_expected.to eq(uri + 'module=foo&action=bar') } end end end
Version data entries
13 entries across 13 versions & 2 rubygems