Skip to content

add have_a_version_with matcher#394

Merged
batter merged 1 commit intopaper-trail-gem:masterfrom
emre-basala:version-spec-helper
Jul 9, 2014
Merged

add have_a_version_with matcher#394
batter merged 1 commit intopaper-trail-gem:masterfrom
emre-basala:version-spec-helper

Conversation

@emre-basala
Copy link
Copy Markdown
Contributor

so we can use this in rspec
with

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

@emre-basala
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants