Skip to content

Commit 04843bc

Browse files
committed
Merge pull request rspec#1871 from bf4/only_test_backtrace_on_mri
Skip specs with non-mri-compatible backtrace.
2 parents ae3d435 + e8f21d2 commit 04843bc

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

features/core_standalone.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Feature: Use rspec-core without rspec-mocks or rspec-expectations
55
available, but rspec-core can be used just fine without either of those
66
gems installed.
77

8+
# Rubinius stacktrace includes kernel/loader.rb etc.
9+
@unsupported-on-rbx
810
Scenario: Use only rspec-core when only it is installed
911
Given only rspec-core is installed
1012
And a file named "core_only_spec.rb" with:

spec/rspec/core/formatters/documentation_formatter_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def execution_result(values)
7777
")
7878
end
7979

80-
# The backrace is slightly different on JRuby so we skip there.
81-
it 'produces the expected full output', :unless => RUBY_PLATFORM == 'java' do
80+
# The backtrace is slightly different on JRuby/Rubinius so we skip there.
81+
it 'produces the expected full output', :if => RSpec::Support::Ruby.mri? do
8282
output = run_example_specs_with_formatter("doc")
8383
output.gsub!(/ +$/, '') # strip trailing whitespace
8484

spec/rspec/core/formatters/progress_formatter_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
expect(output.string).to eq("\n")
4141
end
4242

43-
# The backrace is slightly different on JRuby so we skip there.
44-
it 'produces the expected full output', :unless => RUBY_PLATFORM == 'java' do
43+
# The backtrace is slightly different on JRuby/Rubinius so we skip there.
44+
it 'produces the expected full output', :if => RSpec::Support::Ruby.mri? do
4545
output = run_example_specs_with_formatter("progress")
4646
output.gsub!(/ +$/, '') # strip trailing whitespace
4747

0 commit comments

Comments
 (0)