Namespace
Methods
S
T
Instance Public methods
setup()
# File activemodel/test/cases/observing_test.rb, line 31
def setup
  ObservedModel.observers.clear
end
teardown()
# File activeresource/test/cases/observing_test.rb, line 35
def teardown
  self.history = nil
end
test_create_fires_save_and_create_notifications()
# File activeresource/test/cases/observing_test.rb, line 39
def test_create_fires_save_and_create_notifications
  Person.create(:name => 'Rick')
  assert_equal [:before_save, :before_create, :after_create, :after_save], self.history
end
test_destroy_fires_destroy_notifications()
# File activeresource/test/cases/observing_test.rb, line 50
def test_destroy_fires_destroy_notifications
  person = Person.find(1)
  person.destroy
  assert_equal [:before_destroy, :after_destroy], self.history
end
test_update_fires_save_and_update_notifications()
# File activeresource/test/cases/observing_test.rb, line 44
def test_update_fires_save_and_update_notifications
  person = Person.find(1)
  person.save
  assert_equal [:before_save, :before_update, :after_update, :after_save], self.history
end