Sha256: e45c98b07f6f1a0ca94aca7d0155bb35cea23c44dbfba1e35b80caf5a1ce67f2

Contents?: true

Size: 882 Bytes

Versions: 10

Compression:

Stored size: 882 Bytes

Contents

require 'rspec'
require 'webmock/rspec'

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')

require 'action_kit_rest'

RSpec.configure do |config|
  config.include WebMock::API

  config.before(:each) do
    WebMock.reset!
  end
  config.after(:each) do
    WebMock.reset!
  end

  config.mock_with :rspec do |mocks|
    mocks.syntax = [:should, :expect]
  end

  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end
end

def stub_get(path)
  stub_action_kit_request(:get, path)
end

def stub_post(path)
  stub_action_kit_request(:post, path)
end

def stub_put(path)
  stub_action_kit_request(:put, path)
end

def stub_action_kit_request(method, path)
  stub_request(method, 'https://test.com/rest/v1/' + path)
end

def fixture_path
  File.expand_path("../fixtures", __FILE__)
end

def fixture(file)
  File.new(File.join(fixture_path, '/', file))
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
action_kit_rest-0.4.4 spec/spec_helper.rb
action_kit_rest-0.4.3 spec/spec_helper.rb
action_kit_rest-0.4.2 spec/spec_helper.rb
action_kit_rest-0.4.1 spec/spec_helper.rb
action_kit_rest-0.4.0 spec/spec_helper.rb
action_kit_rest-0.3.8 spec/spec_helper.rb
action_kit_rest-0.3.7 spec/spec_helper.rb
action_kit_rest-0.3.6 spec/spec_helper.rb
action_kit_rest-0.3.5 spec/spec_helper.rb
action_kit_rest-0.3.4 spec/spec_helper.rb