Sha256: f653806857eab5e9d12e05daefb60b860f56b1e2dfcf465f49563c09c5bcb178

Contents?: true

Size: 1.16 KB

Versions: 1

Compression:

Stored size: 1.16 KB

Contents

require "simplecov"
require File.expand_path("../../lib/instagram", __FILE__)
require "rspec"
require "webmock/rspec"

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

SimpleCov.start do
  add_group "Instagram", "lib/instagram"
  add_group "Faraday Middleware", "lib/faraday"
  add_group "Specs", "spec"
end

def capture_output
  begin
    old_stdout = $stdout
    $stdout = StringIO.new
    yield
    result = $stdout.string
  ensure
    $stdout = old_stdout
  end
  result
end

def a_delete(path)
  a_request(:delete, Instagram.endpoint + path)
end

def a_get(path)
  a_request(:get, Instagram.endpoint + path)
end

def a_post(path)
  a_request(:post, Instagram.endpoint + path)
end

def a_put(path)
  a_request(:put, Instagram.endpoint + path)
end

def stub_delete(path)
  stub_request(:delete, Instagram.endpoint + path)
end

def stub_get(path)
  stub_request(:get, Instagram.endpoint + path)
end

def stub_post(path)
  stub_request(:post, Instagram.endpoint + path)
end

def stub_put(path)
  stub_request(:put, Instagram.endpoint + path)
end

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

def fixture(file)
  File.new(fixture_path + "/" + file)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
instagram-continued-continued-1.5.0 spec/spec_helper.rb