diff options
| author | Tom Black <[email protected]> | 2016-12-24 22:17:34 -0600 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2016-12-24 22:17:34 -0600 |
| commit | e81d32b470cdead1c114b6d1b5b6bda958d6b1ad (patch) | |
| tree | 3d61e376c8f460b2ff932cb9f9104f2e0cf5b72e /test/spec_helper.rb | |
| parent | 326b74d485ce81c0a4e1da0e5158a2c83e028915 (diff) | |
| download | ruby2d-e81d32b470cdead1c114b6d1b5b6bda958d6b1ad.tar.gz ruby2d-e81d32b470cdead1c114b6d1b5b6bda958d6b1ad.zip | |
Merge all tests into `test/` directory
Diffstat (limited to 'test/spec_helper.rb')
| -rw-r--r-- | test/spec_helper.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/spec_helper.rb b/test/spec_helper.rb new file mode 100644 index 0000000..d93bff8 --- /dev/null +++ b/test/spec_helper.rb @@ -0,0 +1,23 @@ +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 + + # Silence output when running tests + original_stderr = $stderr + original_stdout = $stdout + config.before(:all) do + # Redirect stderr and stdout + $stderr = File.open(File::NULL, "w") + $stdout = File.open(File::NULL, "w") + end + config.after(:all) do + # Restore + $stderr = original_stderr + $stdout = original_stdout + end +end |
