diff options
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 |
