diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-20 08:52:48 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-20 08:52:48 +0100 |
commit | 206c5643aae40b0884d42fdb8caeb3f763936fa9 (patch) | |
tree | 608f5cc7daab7b58b3d159429c595303e7e1c7d4 /activemodel/test/observing_test.rb | |
parent | fb1eebac940d0648d1640d20a24f085d901d6f30 (diff) | |
parent | 20a346170cf3922d16e265487cfb1abcc85383c1 (diff) | |
download | rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.tar.gz rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.tar.bz2 rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activemodel/test/observing_test.rb')
-rw-r--r-- | activemodel/test/observing_test.rb | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/activemodel/test/observing_test.rb b/activemodel/test/observing_test.rb index 34bf260d69..dc41c9f881 100644 --- a/activemodel/test/observing_test.rb +++ b/activemodel/test/observing_test.rb @@ -40,24 +40,22 @@ class ObservingTest < ActiveModel::TestCase assert ObservedModel.observers.include?(:bar), ":bar not in #{ObservedModel.observers.inspect}" end - uses_mocha "observer instantiation" do - test "instantiates observer names passed as strings" do - ObservedModel.observers << 'foo_observer' - FooObserver.expects(:instance) - ObservedModel.instantiate_observers - end - - test "instantiates observer names passed as symbols" do - ObservedModel.observers << :foo_observer - FooObserver.expects(:instance) - ObservedModel.instantiate_observers - end - - test "instantiates observer classes" do - ObservedModel.observers << ObservedModel::Observer - ObservedModel::Observer.expects(:instance) - ObservedModel.instantiate_observers - end + test "instantiates observer names passed as strings" do + ObservedModel.observers << 'foo_observer' + FooObserver.expects(:instance) + ObservedModel.instantiate_observers + end + + test "instantiates observer names passed as symbols" do + ObservedModel.observers << :foo_observer + FooObserver.expects(:instance) + ObservedModel.instantiate_observers + end + + test "instantiates observer classes" do + ObservedModel.observers << ObservedModel::Observer + ObservedModel::Observer.expects(:instance) + ObservedModel.instantiate_observers end test "passes observers to subclasses" do |