rspec / rspec-core

RSpec runner and formatters
http://rspec.info
MIT License
1.23k stars 765 forks source link

Future of RR support? #2882

Closed voxik closed 3 years ago

voxik commented 3 years ago

It seems that RR since version 1.2 have dropped support for RSpec:

https://github.com/rr/rr/issues/65

and since that time, the RR test cases fails:

(::) failed steps (::)

expected "F\n\nFailures:\n\n  1) mocking with RSpec passes when it should\n     Failure/Error: mock(receiver)....ilure\n\nFailed examples:\n\nrspec ./example_spec.rb:6 # mocking with RSpec passes when it should\n" to string includes: "0 failures"
Diff:
@@ -1,2 +1,18 @@
-0 failures
+F
+
+Failures:
+
+  1) mocking with RSpec passes when it should
+     Failure/Error: mock(receiver).message
+
+     NoMethodError:
+       undefined method `mock' for #<RSpec::ExampleGroups::MockingWithRSpec "passes when it should" (./example_spec.rb:6)>
+     # ./example_spec.rb:8:in `block (2 levels) in <top (required)>'
+
+Finished in 0.00151 seconds (files took 0.06332 seconds to load)
+1 example, 1 failure
+
+Failed examples:
+
+rspec ./example_spec.rb:6 # mocking with RSpec passes when it should
 (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/additional_cli_steps.rb:26:in `/^the example(?:s)? should(?: all)? pass$/'
features/mock_framework_integration/use_rr.feature:21:in `Then the examples should all pass'

expected "*\n\nPending: (Failures listed here are expected and do not affect your suite's status)\n\n  1) pass...Finished in 0.00134 seconds (files took 0.0634 seconds to load)\n1 example, 0 failures, 1 pending\n" to string includes: "1 example, 1 failure"
Diff:
@@ -1,2 +1,15 @@
-1 example, 1 failure
+*
+
+Pending: (Failures listed here are expected and do not affect your suite's status)
+
+  1) passing message expectation in a pending example fails with FIXED
+     # No reason given
+     Failure/Error: mock(receiver).message
+
+     NoMethodError:
+       undefined method `mock' for #<RSpec::ExampleGroups::PassingMessageExpectationInAPendingExample "fails with FIXED" (./example_spec.rb:6)>
+     # ./example_spec.rb:9:in `block (2 levels) in <top (required)>'
+
+Finished in 0.00134 seconds (files took 0.0634 seconds to load)
+1 example, 0 failures, 1 pending
 (RSpec::Expectations::ExpectationNotMetError)
features/mock_framework_integration/use_rr.feature:77:in `Then the output should contain "1 example, 1 failure"'

Failing Scenarios:
cucumber features/mock_framework_integration/use_rr.feature:5 # Scenario: Passing message expectation
cucumber features/mock_framework_integration/use_rr.feature:59 # Scenario: Passing message expectation in pending example (fails)

Therefore I wonder, what is the future of RR support?

pirj commented 3 years ago

Mocha seems to be more popular than rr, and we provide our equally popularrspec-mocks. If might not a big deal to implement (see Mocha glue code). And as it's pointed in rr discussion, it's some moving of stuff around broke the integration.

We'll gladly accept a patch, but writing one is not amongst the priorities.

voxik commented 3 years ago

I was thinking more about proposing to retire the RR support. Currently, the RSpec test suite runs again version of RR from 2013:

https://github.com/rspec/rspec-core/blob/ea8554afd1a2b63677c6593059fa8f2476181deb/rspec-core.gemspec#L55

I don't think this is very helpful.

JonRowe commented 3 years ago

This is something we could drop in version 4 @pirj if you wanted?

pirj commented 3 years ago

Fixed in #2884