Sha256: 9564f93f6b8a87b94a18e1182aa5104e6bff9ed3696d76c824fa1b5ac11cc7d2

Contents?: true

Size: 1.23 KB

Versions: 585

Compression:

Stored size: 1.23 KB

Contents

require "files.com"
require "pathname"

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  RSpec.shared_context "API Helpers" do
    let(:test_folder) { @test_folder }
    let(:api_key) { @api_key }
    let(:options) { { api_key: api_key } }
  end

  config.include_context "API Helpers", :with_test_folder

  config.around(:example, :with_test_folder) do |all|
    @api_key = ENV["TEST_API_KEY"] || File.read("../../config/test_api_key.txt")
    @test_folder = Pathname.new("files_regional_worker/#{SecureRandom.uuid}")
    Files::Folder.exist?("files_regional_worker", api_key: @api_key)
    Files::Folder.mkdir("files_regional_worker", {}, api_key: @api_key) unless Files::Folder.exist?("files_regional_worker", api_key: @api_key)
    Files::Folder.mkdir(@test_folder.to_s, {}, api_key: @api_key)
    all.run
  ensure
    Files::Folder.delete(@test_folder.to_s, { recursive: true }, api_key: @api_key)
  end

  config.shared_context_metadata_behavior = :apply_to_host_groups
  config.disable_monkey_patching!
  config.order = :random
  Kernel.srand config.seed
end

Version data entries

585 entries across 585 versions & 1 rubygems

Version Path
files.com-1.1.180 spec/spec_helper.rb
files.com-1.1.179 spec/spec_helper.rb
files.com-1.1.178 spec/spec_helper.rb
files.com-1.1.177 spec/spec_helper.rb
files.com-1.1.176 spec/spec_helper.rb
files.com-1.1.175 spec/spec_helper.rb
files.com-1.1.174 spec/spec_helper.rb
files.com-1.1.173 spec/spec_helper.rb
files.com-1.1.172 spec/spec_helper.rb
files.com-1.1.171 spec/spec_helper.rb
files.com-1.1.170 spec/spec_helper.rb
files.com-1.1.169 spec/spec_helper.rb
files.com-1.1.168 spec/spec_helper.rb
files.com-1.1.167 spec/spec_helper.rb
files.com-1.1.166 spec/spec_helper.rb
files.com-1.1.165 spec/spec_helper.rb
files.com-1.1.164 spec/spec_helper.rb
files.com-1.1.163 spec/spec_helper.rb
files.com-1.1.162 spec/spec_helper.rb
files.com-1.1.161 spec/spec_helper.rb