Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support RSpec 4 #64

Merged
merged 1 commit into from
Feb 24, 2021
Merged

Conversation

pirj
Copy link
Contributor

@pirj pirj commented Feb 20, 2021

RSpec 4 has changed the semantic of multi-condition filtering. To include a module to a group matching any of the conditions, the conditions should be separate statements.

See:

RSpec 4 has changed the semantic of multi-condition filtering.
To include a module to a group matching *any* of the conditions, the
conditions should be separate statements.
@pirj
Copy link
Contributor Author

pirj commented Feb 20, 2021

@alexrothenberg Appreciate it if you could accept and merge. RSpec 4's development build is red.

pirj added a commit to rspec/rspec-rails that referenced this pull request Feb 20, 2021
See:

- rspec/rspec-core#1821
- rspec/rspec-core#2874
- alexrothenberg/ammeter#64
- example failure (Ammeter::RSpec::Rails::GeneratorExampleGroup that defines destination is not included) https://github.com/rspec/rspec-core/pull/2874/checks?check_run_id=1942170588

Alternative to #2468
@pirj
Copy link
Contributor Author

pirj commented Feb 20, 2021

Spec failures look unrelated:

      +LoadError: cannot load such file -- bootsnap/setup
rspec-rails-4.1.0.pre requires ruby version >= 2.2.0, which is incompatible with the current version, ruby 2.1.2p95
Failure/Error: ActiveRecord::Base.establish_connection :adapter => "sqlite3", :database => ":memory:"

Gem::LoadError:

  Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

pirj added a commit to rspec/rspec-rails that referenced this pull request Feb 20, 2021
See:

- rspec/rspec-core#1821
- rspec/rspec-core#2874
- alexrothenberg/ammeter#64
- example failure (Ammeter::RSpec::Rails::GeneratorExampleGroup that defines destination is not included) https://github.com/rspec/rspec-core/pull/2874/checks?check_run_id=1942170588

Alternative to #2468
pirj added a commit to rspec/rspec-rails that referenced this pull request Feb 20, 2021
See:

- rspec/rspec-core#1821
- rspec/rspec-core#2874
- alexrothenberg/ammeter#64
- example failure (Ammeter::RSpec::Rails::GeneratorExampleGroup that defines destination is not included) https://github.com/rspec/rspec-core/pull/2874/checks?check_run_id=1942170588

Alternative to #2468
pirj added a commit to rspec/rspec-rails that referenced this pull request Feb 22, 2021
See:

- rspec/rspec-core#1821
- rspec/rspec-core#2874
- alexrothenberg/ammeter#64
- example failure (Ammeter::RSpec::Rails::GeneratorExampleGroup that defines destination is not included) https://github.com/rspec/rspec-core/pull/2874/checks?check_run_id=1942170588

Alternative to #2468
@alexrothenberg
Copy link
Owner

@pirj Thank you for this. I'll merge and try to get a new version onto rubygems as soon as I can get the build green again. As you've figured out I haven't touched this in a long time and bitrot has caused CI to go red but I should be able to resolve that with a little time.

@alexrothenberg alexrothenberg merged commit 74146c4 into alexrothenberg:master Feb 24, 2021
@pirj pirj deleted the support-rspec-4 branch February 24, 2021 16:32
@pirj
Copy link
Contributor Author

pirj commented Feb 24, 2021

Thank you!

We've worked this around with mininal impact in rspec-rails's specs (https://github.com/rspec/rspec-rails/pull/2469/files),
so please take your time. No pressure.

If you need help with any of the build issues - let me know, chances are we've been though some of this in RSpec, and I could help fixing or point out at our fixes.

@alexrothenberg
Copy link
Owner

Thanks for the offer. I used the github actions https://github.com/rspec/rspec-rails/blob/main/.github/workflows/ci.yml from rspec-rails as inspiration and was able to get it working in #65. I've already merged and pushed v1.1.5 up to https://rubygems.org/gems/ammeter.

I'm so happy to know that the rspec team still finds this useful as I use rspec every day and appreciate all the hard work you all have done to keep it awesome all these years 😍

@pirj
Copy link
Contributor Author

pirj commented Feb 24, 2021

Yes, ammeter is used, and we rely on it exclusively to test generators. 👍

Thank you once again, for your support and updating it so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants