Sha256: 824b18fe2c9b43ab4bae52abba138ae52c446e0dc6ce701078dc558340a16c28

Contents?: true

Size: 921 Bytes

Versions: 1

Compression:

Stored size: 921 Bytes

Contents

require 'rubygems'
require 'bundler/setup'
require 'awesome_print'
require 'ephemeral_response'

require 'ruby-mws'

RSpec.configure do |config|
  def fixture(path)
    File.open(File.join(File.expand_path(File.dirname(__FILE__)), 'fixtures', path)).read
  end

  def mws_object
    @mws_object ||= MWS.new(auth_params)
  end

  # To test, create spec/credentials.yml
  def auth_params
    @auth_params ||=
      begin
        hsh = YAML.load(File.open(File.join(File.expand_path(File.dirname(__FILE__)), 'credentials.yml'))).symbolize_keys!
      rescue
        {
          :aws_access_key_id  => 'access',
          :secret_access_key  => 'super_secret',
          :seller_id          => 'doma',
          :marketplace_id     => '123'
        }
      end
  end

  def timestamp
    # use a recent timestamp here... how to replace this?
    "2013-11-17T21:17:59-06:00"
  end
end

class TestWorksError < StandardError
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-mws-0.1 spec/spec_helper.rb