Sha256: 72ed974c8d5531e2d3d8cc8a65fa0131c82d61ea30881d4723a5f09f95aa1d2c

Contents?: true

Size: 800 Bytes

Versions: 1

Compression:

Stored size: 800 Bytes

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'dates_toolbox'

RSpec.configure do |config|
    # Enable flags like --only-failures and --next-failure
    config.example_status_persistence_file_path = '.rspec_status'

    # Disable RSpec exposing methods globally on `Module` and `main`
    config.disable_monkey_patching!

    config.expect_with :rspec do |c|
        c.syntax = :expect
    end

    original_stderr = $stderr
    original_stdout = $stdout

    # Surpress console output
    config.before(:all) do
        # Redirect stderr and stdout
        $stderr = File.open(File::NULL, 'w')
        $stdout = File.open(File::NULL, 'w')
    end

    # Allow console output
    config.after(:all) do
        $stderr = original_stderr
        $stdout = original_stdout
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dates_toolbox-1.0.1 spec/spec_helper.rb