Sha256: 8c7793bde740b4e9cda91dd18327874e0836350d36fa92ebd7a1009e2a9e72bb
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
ENV['RAILS_ENV'] ||= 'test' # Generate Simplecov report require 'simplecov' SimpleCov.start 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
europeana-blacklight-1.2.2 | spec/spec_helper.rb |
europeana-blacklight-1.2.1 | spec/spec_helper.rb |
europeana-blacklight-1.2.0 | spec/spec_helper.rb |