Sha256: 9e5ae8da148d44cc5ba1202dff5039f67159dbc1e1a47c138cb69bf0dba61505

Contents?: true

Size: 595 Bytes

Versions: 8

Compression:

Stored size: 595 Bytes

Contents

require 'dribbble'
require 'webmock/rspec'

Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each { |f| require f }

# WebMock.disable_net_connect! allow_localhost: true, allow: 'codeclimate.com'

RSpec.configure do |config|
  config.before :all do
    WebMock.reset!
  end
end

def stub_dribbble(method, path, response_class)
  url = /api.dribbble.com\/v1#{Regexp.escape path}(\?.*)?$/
  stub_request(method, url).to_rack(response_class)
end

def data_from_json(json_name)
  file_name = "#{File.dirname(__FILE__)}/support/fixtures/#{json_name}"
  JSON.parse File.open(file_name, 'rb').read
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dribbble-1.2.0 spec/spec_helper.rb
dribbble-1.1.0 spec/spec_helper.rb
dribbble-1.0.4 spec/spec_helper.rb
dribbble-1.0.2 spec/spec_helper.rb
dribbble-1.0.1 spec/spec_helper.rb
dribbble-1.0.0 spec/spec_helper.rb
dribbble-1.0.0.beta2 spec/spec_helper.rb
dribbble-1.0.0.beta1 spec/spec_helper.rb