Sha256: e7139f37281d395a935be5efc0e6e1985186ba7c5db0604a9979ffaf9044f294

Contents?: true

Size: 671 Bytes

Versions: 14

Compression:

Stored size: 671 Bytes

Contents

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

describe Braintree::ValidationError do
  describe "initialize" do
    it "works" do
      error = Braintree::ValidationError.new :attribute => "some model attribute", :code => 1, :message => "bad juju"
      error.attribute.should == "some model attribute"
      error.code.should == 1
      error.message.should == "bad juju"
    end
  end

  describe "inspect" do
    it "is pretty" do
      error = Braintree::ValidationError.new :attribute => "number", :code => "123456", :message => "Number is bad juju."
      error.inspect.should == "#<Braintree::ValidationError (123456) Number is bad juju.>"
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
braintree-2.6.0 spec/unit/braintree/validation_error_spec.rb
braintree-2.5.2 spec/unit/braintree/validation_error_spec.rb
braintree-2.5.1 spec/unit/braintree/validation_error_spec.rb
braintree-2.4.0 spec/unit/braintree/validation_error_spec.rb
braintree-2.3.1 spec/unit/braintree/validation_error_spec.rb
braintree-2.2.0 spec/unit/braintree/validation_error_spec.rb
braintree-2.1.0 spec/unit/braintree/validation_error_spec.rb
braintree-2.0.0 spec/unit/braintree/validation_error_spec.rb
braintree-1.2.1 spec/unit/braintree/validation_error_spec.rb
braintree-1.2.0 spec/unit/braintree/validation_error_spec.rb
braintree-1.1.3 spec/unit/braintree/validation_error_spec.rb
braintree-1.1.2 spec/unit/braintree/validation_error_spec.rb
braintree-1.1.1 spec/unit/braintree/validation_error_spec.rb
braintree-1.1.0 spec/unit/braintree/validation_error_spec.rb