Sha256: 3425ceac820898da0f0019ade26fc670fc86b6ca97c18bad338859c3eb036aed

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

# encoding: utf-8
unless ENV['CI']
  require 'simplecov'
  SimpleCov.start do
    add_group 'Domainr', 'lib/domainr'
    add_group 'Specs', 'spec'
  end
end

require 'fakeweb'
require 'domainr'

FakeWeb.allow_net_connect = false

FakeWeb.register_uri(:get, "http://domainr.com/api/json/info?q=domai.nr&client_id=domainr_rubygem", :response => File.join(File.dirname(__FILE__), 'fixtures', 'info.json'), :content_type => "text/javascript+json; charset=utf-8", :status => ["200", "OK"])
FakeWeb.register_uri(:get, "http://domainr.com/api/json/info?q=d&client_id=domainr_rubygem", :response => File.join(File.dirname(__FILE__), 'fixtures', 'empty_info.json'), :content_type => "text/javascript+json; charset=utf-8", :status => ["200", "OK"])
FakeWeb.register_uri(:get, "http://domainr.com/api/json/search?q=domainr&client_id=domainr_rubygem", :response => File.join(File.dirname(__FILE__), 'fixtures', 'search.json'), :content_type => "text/javascript+json; charset=utf-8", :status => ["200", "OK"])
FakeWeb.register_uri(:get, "http://domainr.com/api/json/search?q=&client_id=domainr_rubygem", :response => File.join(File.dirname(__FILE__), 'fixtures', 'empty_search.json'), :content_type => "text/javascript+json; charset=utf-8", :status => ["200", "OK"])

RSpec.configure do |config|
  config.order = :random
  config.expect_with :rspec do |expectations|
    expectations.syntax = :expect
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
domainr-0.2.0 spec/spec_helper.rb