Sha256: 355e5131c939257317b92f343b28bd07264c6a9a5c9eeb02a68ea26d4b19cd8a

Contents?: true

Size: 898 Bytes

Versions: 16

Compression:

Stored size: 898 Bytes

Contents

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

describe Braintree::SuccessfulResult do
  describe "initialize" do
    it "sets instance variables from the values in the hash" do
      result = Braintree::SuccessfulResult.new(
        :transaction => "transaction_value",
        :credit_card => "credit_card_value",
      )
      result.success?.should == true
      result.transaction.should == "transaction_value"
      result.credit_card.should == "credit_card_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(:transaction => "transaction_value")
      result.inspect.should == "#<Braintree::SuccessfulResult transaction:\"transaction_value\">"
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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