Sha256: 18d17720cb5ceb6ef8a2f16cc57d83e7c77a5ec1e0c6fff17e9d5b29ef0c083b

Contents?: true

Size: 1.21 KB

Versions: 4

Compression:

Stored size: 1.21 KB

Contents

begin
  require "simplecov"
rescue LoadError
  # ignore
else
  SimpleCov.start do
    add_group "Instagram", "lib/instagram"
    add_group "Faraday Middleware", "lib/faraday"
    add_group "Specs", "spec"
  end
end

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

require "rspec"
require "webmock/rspec"
RSpec.configure do |config|
  config.include WebMock::API
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

4 entries across 4 versions & 1 rubygems

Version Path
instagram-continued-1.4.0 spec/spec_helper.rb
instagram-continued-1.3.3 spec/spec_helper.rb
instagram-continued-1.3.2 spec/spec_helper.rb
instagram-continued-1.3.1 spec/spec_helper.rb