Sha256: 725caac691fcec378764dd8c4cf270fa9c9f200328699143415e46210808659a

Contents?: true

Size: 511 Bytes

Versions: 18

Compression:

Stored size: 511 Bytes

Contents

require 'spec_helper'

class ApiCallTest
  include Localeapp::ApiCall
end

describe Localeapp::ApiCall, "#api_call(endpoint, options = {})" do
  it "creates an ApiCaller object and tells it to make the call" do
    api_call_test = ApiCallTest.new
    api_call = double('api_call')
    expect(api_call).to receive(:call).with(api_call_test)
    expect(Localeapp::ApiCaller).to receive(:new).with(:endpoint, { :foo => :bar }).and_return(api_call)
    api_call_test.api_call(:endpoint, { :foo => :bar })
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
localeapp-3.3.0 spec/localeapp/api_call_spec.rb
localeapp-3.2.0 spec/localeapp/api_call_spec.rb
localeapp-3.1.3 spec/localeapp/api_call_spec.rb
localeapp-3.1.2 spec/localeapp/api_call_spec.rb
localeapp-3.1.1 spec/localeapp/api_call_spec.rb
localeapp-3.1.0 spec/localeapp/api_call_spec.rb
localeapp-3.0.1 spec/localeapp/api_call_spec.rb
localeapp-3.0.0 spec/localeapp/api_call_spec.rb
localeapp-2.5.0 spec/localeapp/api_call_spec.rb
localeapp-2.4.0 spec/localeapp/api_call_spec.rb
localeapp-2.3.0 spec/localeapp/api_call_spec.rb
localeapp-2.2.0 spec/localeapp/api_call_spec.rb
localeapp-2.1.1 spec/localeapp/api_call_spec.rb
localeapp-2.1.0 spec/localeapp/api_call_spec.rb
localeapp-2.0.0 spec/localeapp/api_call_spec.rb
localeapp-1.0.2 spec/localeapp/api_call_spec.rb
localeapp-1.0.1 spec/localeapp/api_call_spec.rb
localeapp-1.0.0 spec/localeapp/api_call_spec.rb