Sha256: ca66d9eb1d6709e2fe948f3c551a8b54c8824cba10db433a5def590d131ce1cb

Contents?: true

Size: 719 Bytes

Versions: 16

Compression:

Stored size: 719 Bytes

Contents

require 'footrest'
require 'bearcat'
require 'rspec'
require 'webmock/rspec'
require 'json'

WebMock.disable_net_connect!

def fixture(file)
  File.new(File.join(File.expand_path("../fixtures", __FILE__), file))
end

def stub_get(client, url)
  stub_request(:get, "#{client.config[:prefix]}#{url}")
end

def stub_post(client, url)
  stub_request(:post, "#{client.config[:prefix]}#{url}")
end

def stub_put(client, url)
  stub_request(:put, "#{client.config[:prefix]}#{url}")
end

def stub_delete(client, url)
  stub_request(:delete, "#{client.config[:prefix]}#{url}")
end

def json_response(file)
  {
    :body => fixture(file),
    :headers => {
      :content_type => 'application/json; charset=utf-8'
    }
  }
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
bearcat-0.9.10 spec/helper.rb
bearcat-0.9.9 spec/helper.rb
bearcat-0.9.8 spec/helper.rb
bearcat-0.9.7 spec/helper.rb
bearcat-0.9.6 spec/helper.rb
bearcat-0.9.5 spec/helper.rb
bearcat-0.9.4 spec/helper.rb
bearcat-0.9.3 spec/helper.rb
bearcat-0.9.2 spec/helper.rb
bearcat-0.9.1 spec/helper.rb
bearcat-0.9 spec/helper.rb
bearcat-0.8 spec/helper.rb
bearcat-0.7 spec/helper.rb
bearcat-0.6 spec/helper.rb
bearcat-0.4 spec/helper.rb
bearcat-0.3 spec/helper.rb