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

add have_a_version_with matcher #394

Merged
merged 1 commit into from Jul 9, 2014
Merged

add have_a_version_with matcher #394

merged 1 commit into from Jul 9, 2014

Conversation

emre-basala
Copy link
Contributor

so we can use this in rspec
with

 widget.should have_a_version_with :name => 'Leonard', :an_integer => 1

@emre-basala
Copy link
Contributor Author

Build failing, I will fix this and open the PR again

@emre-basala emre-basala closed this Jul 9, 2014
@emre-basala emre-basala reopened this Jul 9, 2014
@batter batter added this to the 3.1.0 milestone Jul 9, 2014
batter added a commit that referenced this pull request Jul 9, 2014
Add RSpec :have_a_version_with matcher
@batter batter merged commit 80071ba into paper-trail-gem:master Jul 9, 2014
@batter
Copy link
Collaborator

batter commented Jul 9, 2014

Thanks for the PR. Good idea for a matcher, I just pushed up 6c7efd0, where I updated the matcher to have simplified syntax, and use our existing where_object method on the PaperTrail::Version class, which actually queries the database and should provide a performance boost over the pure Ruby sort 😄

@emre-basala
Copy link
Contributor Author

great thanks! I didn't know about the where_object method, the matcher looks a lot cleaner with it

@emre-basala emre-basala deleted the version-spec-helper branch July 9, 2014 23:25
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.

None yet

2 participants