Sha256: e319f6735339e457635e8c0956e5e34e7d6f3b4265b616d92292c6dfeafc41a7

Contents?: true

Size: 547 Bytes

Versions: 5

Compression:

Stored size: 547 Bytes

Contents

require 'pinboard'
require 'rspec'
require 'webmock/rspec'

def auth_params
  { :username => 'user',
    :password => 'pass' }
end

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

def stub_get(path)
  stub_request(:get, uri(path))
end

def stub_post(path)
  stub_request(:post, uri(path))
end

def uri(path)
  "https://#{auth_params[:username]}:#{auth_params[:password]}@api.pinboard.in/v1/#{path}"
end

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pinboard-1.0.0 spec/helper.rb
pinboard-0.1.1 spec/helper.rb
pinboard-0.1.0 spec/helper.rb
pinboard-0.0.51 spec/helper.rb
pinboard-0.0.5 spec/helper.rb