Sha256: d287398ff2ec3aa28a8e0a5471e19f078903b385dbda522007002e4db9ddaa1b
Contents?: true
Size: 996 Bytes
Versions: 3
Compression:
Stored size: 996 Bytes
Contents
require File.expand_path('../test_helper', File.dirname(__FILE__)) require 'aws-sdk' module Coverband class S3ReportWriterTest < Test::Unit::TestCase def html_version Gem::Specification.find_by_name('simplecov-html').version.version.to_s rescue StandardError '0.10.1' end test 'it writes the coverage report to s3' do s3 = mock('s3_resource') bucket = mock('bucket') object = mock('object') s3.expects(:bucket).with('coverage-bucket').returns(bucket) bucket.expects(:object).with('coverband/index.html').returns(object) File.expects(:read).at_least(0).returns("content ./assets/#{html_version}/") object.expects(:put).with(body: 'content ') Aws::S3::Resource.expects(:new).returns(s3) s3_writer_options = { region: 'us-west-1', access_key_id: '', secret_access_key: '' } Coverband::Utils::S3ReportWriter.new('coverage-bucket', s3_writer_options).persist! end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
coverband-3.0.0 | test/unit/utils_s3_report_writer_test.rb |
coverband-3.0.0.alpha2 | test/unit/utils_s3_report_writer_test.rb |
coverband-3.0.0.alpha | test/unit/utils_s3_report_writer_test.rb |