Module: RailsAuditLog::MinitestAssertions
- Defined in:
- lib/rails_audit_log/minitest_assertions.rb
Instance Method Summary collapse
- #assert_audit_log_entry(record, event: nil, touching: nil, message: nil) ⇒ Object
- #refute_audit_log_entry(record, event: nil, touching: nil, message: nil) ⇒ Object
Instance Method Details
#assert_audit_log_entry(record, event: nil, touching: nil, message: nil) ⇒ Object
3 4 5 6 7 |
# File 'lib/rails_audit_log/minitest_assertions.rb', line 3 def assert_audit_log_entry(record, event: nil, touching: nil, message: nil) scope = build_scope(record, event, touching) msg = || ("to have", record, event, touching) assert scope.exists?, msg end |
#refute_audit_log_entry(record, event: nil, touching: nil, message: nil) ⇒ Object
9 10 11 12 13 |
# File 'lib/rails_audit_log/minitest_assertions.rb', line 9 def refute_audit_log_entry(record, event: nil, touching: nil, message: nil) scope = build_scope(record, event, touching) msg = || ("not to have", record, event, touching) refute scope.exists?, msg end |