Skip to content

Commit

Permalink
When testing compare only the stdout
Browse files Browse the repository at this point in the history
for jruby, there are warning lines are being output. This way, we can differentiate between stdout/stderr output and keep the tests focused on the actual output.
  • Loading branch information
aliismayilov committed Sep 10, 2020
1 parent e5e2b84 commit 057c8dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/cases/engine_internals_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

require 'open3'
require 'cases/test_base'

class EngineInternalsTest < TestBase
Expand Down Expand Up @@ -37,9 +37,9 @@ def inspect
print Haml::Engine.new('%div{ foo: true, bar: false }').render
HAML
f.close
out = IO.popen([RbConfig.ruby, f.path], &:read)
stdout_str, _stderr_str, _status = Open3.capture3("#{RbConfig.ruby} #{f.path}")
assert_equal true, $?.success?
assert_equal "<div foo></div>\n", out
assert_equal "<div foo></div>\n", stdout_str
end
end

Expand Down

0 comments on commit 057c8dc

Please sign in to comment.