Sha256: 39510b2caa80c8bc26a4f106270c88346f3e01281b6a5be5478d89763d999fb9

Contents?: true

Size: 646 Bytes

Versions: 4

Compression:

Stored size: 646 Bytes

Contents

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

describe Fpswax::Error do
  describe "initialize" do
    it "should require a code and a message" do
      lambda {
        Fpswax::Error.new('code', 'message')
      }.should_not raise_error(ArgumentError)
    end
  end

  describe "code" do
    it "should be whatever is passed into the constructor" do
      error = Fpswax::Error.new('mycode', 'msg')
      error.code.should == 'mycode'
    end
  end

  describe "message" do
    it "should be whatever is passed into the constructor" do
      error = Fpswax::Error.new('mycode', 'msg')
      error.message.should == 'msg'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dbalatero-fpswax-0.0.1 spec/fpswax/error_spec.rb
dbalatero-fpswax-0.0.2 spec/fpswax/error_spec.rb
dbalatero-fpswax-0.0.3 spec/fpswax/error_spec.rb
dbalatero-fpswax-0.0.4 spec/fpswax/error_spec.rb