Sha256: 452ced0c3efe27d46dbf811d052c06adc86498d788d295d146cb8daccc255023
Contents?: true
Size: 1.46 KB
Versions: 1
Compression:
Stored size: 1.46 KB
Contents
require "codeclimate-test-reporter" CodeClimate::TestReporter.start gem "minitest" require "minitest/autorun" require "minitest/pride" require "minitest/mock" require "mocha/setup" lib = File.expand_path('../../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "propono" class Minitest::Test def setup Fog.mock! Propono.config do |config| config.access_key = "test-access-key" config.secret_key = "test-secret-key" config.queue_region = "us-east-1" config.application_name = "MyApp" config.queue_suffix = "" config.logger.stubs(:debug) config.logger.stubs(:info) config.logger.stubs(:error) end end end require 'fog' class Fog::AWS::SNS::Mock def create_topic(*args) foo = Object.new class << foo def body {"TopicArn" => "FoobarFromTheMock"} end end foo end def subscribe(topic_arn, arn_or_url, type) end end class Fog::AWS::SQS::Mock def list_queues(*args) foo = Object.new class << foo def body {"QueueUrls" => []} end end foo end def create_queue(*args) end def set_queue_attributes(*args) end end Fog::AWS::SQS::Mock::QueueUrl = 'https://meducation.net/foobar' Fog::AWS::SQS::Mock::QueueArn = 'FoobarArn' data = {'Attributes' => {"QueueArn" => Fog::AWS::SQS::Mock::QueueArn}} queues = Fog::AWS::SQS::Mock.data["us-east-1"]["test-access-key"][:queues] queues[Fog::AWS::SQS::Mock::QueueUrl] = data
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
propono-1.5.0 | test/test_helper.rb |