Sha256: a4dfb36df1bc5ab1943f45c64d84fb65131ce301caeb55bbbda74e81d1b7756f

Contents?: true

Size: 573 Bytes

Versions: 4

Compression:

Stored size: 573 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

module Webmoney

  describe Wmid, "class" do

    before(:each) do
      @t = Wmid.new('123456789012')
    end

    it "should be kind of Wmid" do
      @t.should be_kind_of(Wmid)
    end

    it "should be string" do
      @t.should == '123456789012'
    end

    it "should permit initialize by integer" do
      Wmid.new(123456789012).should == '123456789012'
    end 

    it "should raise error on incorrect wmid" do
      lambda{Wmid.new('abc')}.
        should raise_error(IncorrectWmidError)
    end 

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
webmoney-0.0.7 spec/unit/wmid_spec.rb
webmoney-0.0.6 spec/unit/wmid_spec.rb
webmoney-0.0.5 spec/unit/wmid_spec.rb
webmoney-0.0.4.8 spec/unit/wmid_spec.rb