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

Allow matching against instances of ActiveRecord objects #67

Merged
merged 3 commits into from
Jan 27, 2016

Conversation

lowjoel
Copy link
Contributor

@lowjoel lowjoel commented Jan 27, 2016

Depends on #68.

This follows conventions, such as those by shoulda-matchers, where within a Model spec one can do this:

RSpec.describe Pen do
  it { is_expected.to act_as(Pen) }
end

This is for consistency with other gems, like rspec-rails, and shoulda-matchers.
@lowjoel lowjoel changed the title Move the matchers to active_record/acts_as/matchers Increase the expressiveness of the RSpec matchers Jan 27, 2016
This ensures that later specs run correctly, if specs are run in random order.
This follows conventions, such as those by shoulda-matchers, where within a Model spec one can do this:

```ruby
RSpec.describe Pen do
  it { is_expected.to act_as(Pen) }
end
```
@lowjoel lowjoel changed the title Increase the expressiveness of the RSpec matchers Allow matching against instances of ActiveRecord objects Jan 27, 2016
@lowjoel
Copy link
Contributor Author

lowjoel commented Jan 27, 2016

aff744d is needed to restore the database state so that the matcher specs will run.

hzamani added a commit that referenced this pull request Jan 27, 2016
@hzamani hzamani merged commit 0109eba into hzamani:master Jan 27, 2016
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