diff --git a/spec/rspec_junit_formatter_spec.rb b/spec/rspec_junit_formatter_spec.rb index c981a84..4faf800 100644 --- a/spec/rspec_junit_formatter_spec.rb +++ b/spec/rspec_junit_formatter_spec.rb @@ -133,7 +133,11 @@ def execute_example_spec expect(failed_multiple_testcases.size).to eql(1) failed_multiple_testcases.each do |testcase| expect(testcase.text).to include("foo") - expect(testcase.text).to include("bar") + if Gem::Version.new(RSpec::Core::Version::STRING) >= Gem::Version.new('3.3') + expect(testcase.text).to include("bar") + else + expect(testcase.text).to_not include("bar") + end end # it cleans up diffs