Sha256: 10d6afe3a5ab71b55944a69d2ae059ac1102caf7b1712b7609b300271ade8dfd

Contents?: true

Size: 775 Bytes

Versions: 16

Compression:

Stored size: 775 Bytes

Contents

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

describe Braintree::SuccessfulResult do
  describe "initialize" do
    it "creates attr readers the values in the hash" do
      result = Braintree::SuccessfulResult.new(
        :foo => "foo_value",
        :bar => "bar_value"
      )
      result.success?.should == true
      result.foo.should == "foo_value"
      result.bar.should == "bar_value"
    end

    it "can be initialized without any values" do
      result = Braintree::SuccessfulResult.new
      result.success?.should == true
    end
  end

  describe "inspect" do
    it "is pretty" do
      result = Braintree::SuccessfulResult.new(:foo => "foo_value")
      result.inspect.should == "#<Braintree::SuccessfulResult foo:\"foo_value\">"
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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