Sha256: c991ca51205b6c7a8a2568aff524dcb88f8e3978849b93a202906d6e7338d0e5

Contents?: true

Size: 1.11 KB

Versions: 14

Compression:

Stored size: 1.11 KB

Contents

ENV['RAILS_ENV'] ||= 'test'

require 'coveralls'
Coveralls.wear! unless Coveralls.will_run?.nil?

require File.expand_path('../dummy/config/environment.rb', __FILE__)
require 'rspec/rails'
require 'shoulda/matchers'
require 'webmock/rspec'

require 'europeana/api'
Europeana::API.logger.level = Logger::ERROR

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }

RSpec.configure do |config|
  config.infer_spec_type_from_file_location!

  config.order = 'random'

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  config.before(:each) do
    stub_request(:get, %r{https://www.europeana.eu/api/v2/record/[^/]+/[^/.]+\.json}).
      with(query: hash_including(:wskey)).
      to_return(body: '{"success":true}', headers: { 'content-type' => 'application/json' })

    stub_request(:get, 'https://www.europeana.eu/api/v2/search.json').
      with(query: hash_including(:wskey, :query)).
      to_return(body: '{"success":true}', headers: { 'content-type' => 'application/json' })
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
europeana-blacklight-1.1.0 spec/spec_helper.rb
europeana-blacklight-1.0.0 spec/spec_helper.rb
europeana-blacklight-0.5.2 spec/spec_helper.rb
europeana-blacklight-0.5.1 spec/spec_helper.rb
europeana-blacklight-0.5.0 spec/spec_helper.rb
europeana-blacklight-0.4.9 spec/spec_helper.rb
europeana-blacklight-0.4.8 spec/spec_helper.rb
europeana-blacklight-0.4.7 spec/spec_helper.rb
europeana-blacklight-0.4.6 spec/spec_helper.rb
europeana-blacklight-0.4.5 spec/spec_helper.rb
europeana-blacklight-0.4.4 spec/spec_helper.rb
europeana-blacklight-0.4.3 spec/spec_helper.rb
europeana-blacklight-0.4.2 spec/spec_helper.rb
europeana-blacklight-0.4.1 spec/spec_helper.rb