Rspec test callbacks error

I am trying to test that a callback is run in an AR model (Rails 3) and am getting an error. As far as I can see I am following the api.doc example closely so am a bit confused as to the error.
class SystemError < ActiveRecord::Base
after_save :notify_administrator_of
def notify_administrator_of
sysadmin_user = User.find_by_role_id(Role.find_by_name(‘sysadmin’).id)
SystemMailer.generic_email(, “Wavelineup Error: #{Rails.env} - #{self.error}”, “#{self.incidentals}”).deliver
I am following the following instructions which look like are just an excerpt from the api.dock:
I get the following failure:

  1. SystemError after_save should send an email to the admin after save
    Failure/Error: system_error.run_callbacks(:after_save)
    undefined method `_run_after_save_callbacks’ for #SystemError:0x21a1a60

    ./spec/models/system_error_spec.rb:8:in `block (2 levels) in <top (required)>’

My spec is:

describe “SystemError after_save” do

it “should send an email to the admin after save” do
system_error =


I'm running into the same issue - did you resolve this or open up a
ticket for it?

I dug into this a bit more and found the following thread useful: