aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/observing_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-19 11:08:34 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-19 11:08:34 -0800
commit5b7d07f4231a20e6517ca8fd7beab23e56cf81db (patch)
treed04b42ce08fe0eeaff379acc6a224cf9856e1029 /activemodel/test/observing_test.rb
parenta1ce4008c82f8aabcabaad1e424487f56d6ce2a3 (diff)
downloadrails-5b7d07f4231a20e6517ca8fd7beab23e56cf81db.tar.gz
rails-5b7d07f4231a20e6517ca8fd7beab23e56cf81db.tar.bz2
rails-5b7d07f4231a20e6517ca8fd7beab23e56cf81db.zip
Require mocha for tests. Get rid of uses_mocha helper.
Diffstat (limited to 'activemodel/test/observing_test.rb')
-rw-r--r--activemodel/test/observing_test.rb34
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