Skip to content
This repository
tree: 7fceacc8a5
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 25 lines (20 sloc) 0.585 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
require 'spec_helper'

class ExampleObject < Zuora::Objects::Base
end

class ExampleConnector
  def initialize(model)
  end
end

describe Zuora::Objects::Base do
  describe :connector do
    it "uses SoapConnector by default" do
      ExampleObject.connector.should be_a Zuora::SoapConnector
    end

    it "allows injecting different class for tests" do
      described_class.connector_class = ExampleConnector
      ExampleObject.connector.should be_a ExampleConnector
      #reset for subsequent tests
      described_class.connector_class = Zuora::SoapConnector
    end
  end
end
Something went wrong with that request. Please try again.