Sha256: 42988200b0639619faa7b669220d4471b234a1586d311fdbf54e3d1326abdcca

Contents?: true

Size: 689 Bytes

Versions: 136

Compression:

Stored size: 689 Bytes

Contents

require File.expand_path(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

136 entries across 136 versions & 1 rubygems

Version Path
braintree-4.14.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.13.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.12.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.11.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.10.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.9.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.8.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.7.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.6.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.5.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.4.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.3.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.2.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.1.0 spec/unit/braintree/validation_error_spec.rb
braintree-4.0.0 spec/unit/braintree/validation_error_spec.rb
braintree-3.4.0 spec/unit/braintree/validation_error_spec.rb
braintree-3.3.0 spec/unit/braintree/validation_error_spec.rb
braintree-3.2.0 spec/unit/braintree/validation_error_spec.rb
braintree-3.1.0 spec/unit/braintree/validation_error_spec.rb
braintree-3.0.1 spec/unit/braintree/validation_error_spec.rb