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

Version Path
etherscan-0.1.4 spec/etherscanio_call_spec.rb
etherscan-0.1.3 spec/etherscanio_call_spec.rb
etherscan-0.1.2 spec/etherscanio_call_spec.rb
etherscan-0.1.1 spec/etherscanio_call_spec.rb
etherscan-0.1.0 spec/etherscanio_call_spec.rb
etherscan-0.0.9 spec/etherscanio_call_spec.rb
etherscan-0.0.8 spec/etherscanio_call_spec.rb
etherscan-0.0.7 spec/etherscanio_call_spec.rb
etherscan-0.0.6 spec/etherscanio_call_spec.rb
etherscanio-0.0.5 spec/etherscanio_call_spec.rb
etherscanio-0.0.4 spec/etherscanio_call_spec.rb
etherscanio-0.0.3 spec/etherscanio_call_spec.rb
etherscanio-0.0.1 spec/etherscanio_call_spec.rb