Sha256: 1aacc3d93e6171562e92ca8752347ff3bd68d42f94b613fecbf58304e74fb842

Contents?: true

Size: 734 Bytes

Versions: 5

Compression:

Stored size: 734 Bytes

Contents

require_relative '../lib/credly'

ENV['testing'] = 'true'

RSpec.configure do |config|

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

  config.filter_run :focus => true
  config.run_all_when_everything_filtered = true
  config.treat_symbols_as_metadata_keys_with_true_values = true

  config.order = "random"
end

def expect_api_call(type, url, *args)
  if ENV['HIT_SERVER']
    Credly::Client.any_instance.should_receive(type).with(url, *args).and_call_original
  else
    Credly::Client.any_instance.should_receive(type).with(url, *args).and_return({ test: "Set ENV['HIT_SERVER'] if you wish to hit the real server and get a real response. This is just being mocked at the moment"}.to_json)
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
credly-0.0.5 spec/spec_helper.rb
credly-0.0.4 spec/spec_helper.rb
credly-0.0.3 spec/spec_helper.rb
credly-0.0.2 spec/spec_helper.rb
credly-0.0.1 spec/spec_helper.rb