aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-01-31 16:27:24 +1100
committerJeremy Kemper <jeremy@bitsweat.net>2010-01-31 09:46:30 -0800
commit2ebea1c02d10e0fea26bd98d297a8f4d41dc1aff (patch)
treec85ae3de692c1ac783e67f11e71b8336902d8341 /activesupport
parentb3a028259f373fd58fea2171a1e9e8b2fe3e253a (diff)
downloadrails-2ebea1c02d10e0fea26bd98d297a8f4d41dc1aff.tar.gz
rails-2ebea1c02d10e0fea26bd98d297a8f4d41dc1aff.tar.bz2
rails-2ebea1c02d10e0fea26bd98d297a8f4d41dc1aff.zip
deOMGifying Railties, Active Support, and Action Pack
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/callbacks_test.rb8
-rw-r--r--activesupport/test/fixtures/custom.rb2
-rw-r--r--activesupport/test/fixtures/omgomg.rb2
-rw-r--r--activesupport/test/isolation_test.rb12
-rw-r--r--activesupport/test/notifications_test.rb6
5 files changed, 15 insertions, 15 deletions
diff --git a/activesupport/test/callbacks_test.rb b/activesupport/test/callbacks_test.rb
index df98644436..11494e951e 100644
--- a/activesupport/test/callbacks_test.rb
+++ b/activesupport/test/callbacks_test.rb
@@ -264,12 +264,12 @@ module CallbacksTest
define_callbacks :save
attr_reader :stuff
- set_callback :save, :before, :omg, :per_key => {:if => :yes}
+ set_callback :save, :before, :action, :per_key => {:if => :yes}
def yes() true end
- def omg
- @stuff = "OMG"
+ def action
+ @stuff = "ACTION"
end
def save
@@ -522,7 +522,7 @@ module CallbacksTest
def test_save
obj = HyphenatedCallbacks.new
obj.save
- assert_equal obj.stuff, "OMG"
+ assert_equal obj.stuff, "ACTION"
end
end
end
diff --git a/activesupport/test/fixtures/custom.rb b/activesupport/test/fixtures/custom.rb
new file mode 100644
index 0000000000..0eefce0c25
--- /dev/null
+++ b/activesupport/test/fixtures/custom.rb
@@ -0,0 +1,2 @@
+class Custom
+end \ No newline at end of file
diff --git a/activesupport/test/fixtures/omgomg.rb b/activesupport/test/fixtures/omgomg.rb
deleted file mode 100644
index a512a93ae4..0000000000
--- a/activesupport/test/fixtures/omgomg.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-class OmgOmg
-end \ No newline at end of file
diff --git a/activesupport/test/isolation_test.rb b/activesupport/test/isolation_test.rb
index a7af5e96f6..2c2986ea28 100644
--- a/activesupport/test/isolation_test.rb
+++ b/activesupport/test/isolation_test.rb
@@ -59,15 +59,15 @@ elsif ENV['CHILD']
end
test "resets requires one" do
- assert !defined?(OmgOmg)
- assert_equal 0, $LOADED_FEATURES.grep(/fixtures\/omgomg/).size
- require File.expand_path(File.join(File.dirname(__FILE__), "fixtures", "omgomg"))
+ assert !defined?(Custom)
+ assert_equal 0, $LOADED_FEATURES.grep(/fixtures\/custom/).size
+ require File.expand_path(File.join(File.dirname(__FILE__), "fixtures", "custom"))
end
test "resets requires two" do
- assert !defined?(OmgOmg)
- assert_equal 0, $LOADED_FEATURES.grep(/fixtures\/omgomg/).size
- require File.expand_path(File.join(File.dirname(__FILE__), "fixtures", "omgomg"))
+ assert !defined?(Custom)
+ assert_equal 0, $LOADED_FEATURES.grep(/fixtures\/custom/).size
+ require File.expand_path(File.join(File.dirname(__FILE__), "fixtures", "custom"))
end
end
else
diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb
index d3af535c26..0b78b53c73 100644
--- a/activesupport/test/notifications_test.rb
+++ b/activesupport/test/notifications_test.rb
@@ -77,7 +77,7 @@ module Notifications
def test_instrument_with_bang_returns_result_even_on_failure
begin
instrument!(:awesome, :payload => "notifications") do
- raise "OMG"
+ raise "FAIL"
end
flunk
rescue
@@ -126,10 +126,10 @@ module Notifications
def test_instrument_does_not_publish_when_exception_is_raised
begin
instrument(:awesome, :payload => "notifications") do
- raise "OMG"
+ raise "FAIL"
end
rescue RuntimeError => e
- assert_equal "OMG", e.message
+ assert_equal "FAIL", e.message
end
drain