Sha256: a099746677a3ee1c748bc7d9a9aedc8ac4d2226c4956d28881534d8266c3ab53
Contents?: true
Size: 450 Bytes
Versions: 15
Compression:
Stored size: 450 Bytes
Contents
require 'spec_helper' class AfterRecordUpdateCollection < RecordCollection::Base attribute :section after_record_update{|record| record.update(admin: true) } end RSpec.describe AfterRecordUpdateCollection do subject { described_class.new } it "executes on the record" do employee = Employee.create section: 'SE1', admin: false described_class.new([employee]).update({}) employee.reload employee.admin.should be true end end
Version data entries
15 entries across 15 versions & 1 rubygems