Skip to content

Commit 7f01166

Browse files
committed
(maint) Capture stdout from tests
Test output is captured when running specs in parallel, but not in series like, bundle exec rspec spec, so explicitly capture the output so it doesn't pollute the test results.
1 parent 75dc0e1 commit 7f01166

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

spec/integration/application/agent_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ def mounts
10431043
expect {
10441044
agent.run
10451045
}.to exit_with(1)
1046+
.and output(/Info: Loading facts/).to_stdout
10461047
.and output(
10471048
match(/Error: Evaluation Error: Unknown variable: 'osfamily'/)
10481049
.and match(/Error: Could not retrieve catalog from remote server: Error 500 on SERVER:/)

spec/unit/application/lookup_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ def run_lookup(lookup)
668668
expect {
669669
lookup.run_command
670670
}.to exit_with(0)
671+
.and output(/This is in facts hash/).to_stdout
671672
end
672673
end
673674
end

0 commit comments

Comments
 (0)