hzamani / active_record-acts_as

Simulate multi-table inheritance for activerecord models
MIT License
252 stars 86 forks source link

Allow matching against instances of ActiveRecord objects #67

Closed lowjoel closed 8 years ago

lowjoel commented 8 years ago

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
lowjoel commented 8 years ago

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