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

Remove have(n).items matchers #293

Merged
merged 1 commit into from Aug 17, 2013
Merged

Remove have(n).items matchers #293

merged 1 commit into from Aug 17, 2013

Conversation

@hugobarauna
Copy link
Member

@hugobarauna hugobarauna commented Jul 21, 2013

As explained in the plan for RSpec 3, the have(n).items matchers are going to be extracted to an external gem. So, this PR removes those matchers from rspec-expectations.

Those mastchers will be maintained by Hugo Barauna in a external
gem.
@@ -92,21 +92,6 @@ def object.has_taste_for?(*args); true; end
expect(RSpec::Matchers.generated_description).to eq 'should have taste for "wine", "cheese"'
end

it "expect(...).to have n items" do
Copy link
Member Author

@hugobarauna hugobarauna Jul 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@myronmarston These 3 specs are related to the have(n).items matchers. Although I'm removing them from rspec-expectations, I'm not sure if I should move them to the new rspec-collection_matchers gem. Should I move them to the new repo?

Loading

Copy link
Member

@JonRowe JonRowe Jul 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because you still want the generated descriptions.

Loading

@coveralls
Copy link

@coveralls coveralls commented Jul 21, 2013

Coverage Status

Coverage decreased (-0%) when pulling 8f39d44 on hugobarauna:remove-have-n-items-matchers into b43952f on rspec:master.

Loading

@penelopezone
Copy link
Member

@penelopezone penelopezone commented Jul 21, 2013

@hugobarauna I wouldn't feel comfortable merging this until we've got the external gem. Also what about rspec-collection-matchers instead of rspec-collection_matchers?

Loading

@alindeman
Copy link
Contributor

@alindeman alindeman commented Jul 21, 2013

I think rspec-collection_matchers is the "right" way here if there are two words in the gem extension.

See: http://guides.rubygems.org/patterns/#consistent-naming and as an example: https://github.com/rails/activerecord-session_store

Loading

@penelopezone
Copy link
Member

@penelopezone penelopezone commented Jul 21, 2013

@alindeman that link makes me think it should be named like this. But it still makes me sad.

Loading

@hugobarauna
Copy link
Member Author

@hugobarauna hugobarauna commented Jul 21, 2013

@samphippen I agree with you, we should merge this PR only after having the external gem. I already created a local git repo for that gem in my machine, meanwhile, I already talked to @myronmarston and he's setting up a repo for that gem to live in.

After the he set this up, I'll send the code to that github repo and I'll ask for some code review from you guys. 😉

Loading

@myronmarston
Copy link
Member

@myronmarston myronmarston commented Jul 22, 2013

Thanks for starting this. I've been busy this weekend (we just bought a house and are doing lots of painting and packing in preparation to move next week), but I'll try to make time to make the repo in the next day or so.

Loading

@myronmarston
Copy link
Member

@myronmarston myronmarston commented Jul 22, 2013

@hugobarauna -- the repo is setup for you now:

https://github.com/rspec/rspec-collection_matchers

Have at it!

Loading

@penelopezone
Copy link
Member

@penelopezone penelopezone commented Aug 3, 2013

Can this be closed now?

Loading

@JonRowe
Copy link
Member

@JonRowe JonRowe commented Aug 3, 2013

I think it needs to be merged with the gem is ready? Same situation as autotest.

Loading

@myronmarston
Copy link
Member

@myronmarston myronmarston commented Aug 5, 2013

I think it needs to be merged with the gem is ready? Same situation as autotest.

"ready" is such a generic goal, though. Software is never done and is always changing.

I'd say I'm OK merging this and the autotest PR once the new gem is to a place where we're 100% sure that the removal is going to work out OK. Are there any lingering issues for either?

If not, we can go ahead and merge these.

Loading

@hugobarauna
Copy link
Member Author

@hugobarauna hugobarauna commented Aug 5, 2013

I already finished the first PR in https://github.com/rspec/rspec-collection_matchers and the have(n) matchers are already in its master branch. But, although I've finished the PR, there's at least 2 must have that I still want to finish to call it a 0.1 version:

  1. make CI tests green. They're currently breaking for 1 ruby version, which is jruby 1.8
  2. Write the README

Loading

@JonRowe
Copy link
Member

@JonRowe JonRowe commented Aug 6, 2013

See rspec/rspec-collection_matchers#3 for JRuby fix ;)

Loading

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

Successfully merging this pull request may close these issues.

None yet

6 participants