Skip to content

Commit 6cb2758

Browse files
committed
Ignore missing aggregate_failures support on older versions of RSpec
1 parent b767bc9 commit 6cb2758

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spec/rspec_junit_formatter_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ def execute_example_spec
133133
expect(failed_multiple_testcases.size).to eql(1)
134134
failed_multiple_testcases.each do |testcase|
135135
expect(testcase.text).to include("foo")
136-
expect(testcase.text).to include("bar")
136+
if Gem::Version.new(RSpec::Core::Version::STRING) >= Gem::Version.new('3.3')
137+
expect(testcase.text).to include("bar")
138+
else
139+
expect(testcase.text).to_not include("bar")
140+
end
137141
end
138142

139143
# it cleans up diffs

0 commit comments

Comments
 (0)