aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-18 14:55:20 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-18 15:52:56 -0800
commit36d66786905b3cc2dda6c48345a89bbd760fcb82 (patch)
tree56a964d7e2f15b8275f7c9cdec2334230e1c15df /actionpack/test/abstract
parent7091d800b80dd5cd06c3a232c5386efc16fda6fb (diff)
downloadrails-36d66786905b3cc2dda6c48345a89bbd760fcb82.tar.gz
rails-36d66786905b3cc2dda6c48345a89bbd760fcb82.tar.bz2
rails-36d66786905b3cc2dda6c48345a89bbd760fcb82.zip
removing usesless variable assignments
Diffstat (limited to 'actionpack/test/abstract')
-rw-r--r--actionpack/test/abstract/callbacks_test.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb
index 5308fc849b..3bdde86291 100644
--- a/actionpack/test/abstract/callbacks_test.rb
+++ b/actionpack/test/abstract/callbacks_test.rb
@@ -22,7 +22,7 @@ module AbstractController
class TestCallbacks1 < ActiveSupport::TestCase
test "basic callbacks work" do
controller = Callback1.new
- result = controller.process(:index)
+ controller.process(:index)
assert_equal "Hello world", controller.response_body
end
end
@@ -62,7 +62,7 @@ module AbstractController
end
test "before_filter works" do
- result = @controller.process(:index)
+ @controller.process(:index)
assert_equal "Hello world", @controller.response_body
end
@@ -78,7 +78,7 @@ module AbstractController
test "before_filter with overwritten condition" do
@controller = Callback2Overwrite.new
- result = @controller.process(:index)
+ @controller.process(:index)
assert_equal "", @controller.response_body
end
end
@@ -103,12 +103,12 @@ module AbstractController
end
test "before_filter works with procs" do
- result = @controller.process(:index)
+ @controller.process(:index)
assert_equal "Hello world", @controller.response_body
end
test "after_filter works with procs" do
- result = @controller.process(:index)
+ @controller.process(:index)
assert_equal "Goodbye", @controller.instance_variable_get("@second")
end
end
@@ -152,7 +152,7 @@ module AbstractController
end
test "when :except is specified, an after filter is not triggered on that action" do
- result = @controller.process(:index)
+ @controller.process(:index)
assert !@controller.instance_variable_defined?("@authenticated")
end
end
@@ -186,17 +186,17 @@ module AbstractController
end
test "when :only is specified with an array, a before filter is triggered on that action" do
- result = @controller.process(:index)
+ @controller.process(:index)
assert_equal "Hello, World", @controller.response_body
end
test "when :only is specified with an array, a before filter is not triggered on other actions" do
- result = @controller.process(:sekrit_data)
+ @controller.process(:sekrit_data)
assert_equal "true", @controller.response_body
end
test "when :except is specified with an array, an after filter is not triggered on that action" do
- result = @controller.process(:index)
+ @controller.process(:index)
assert !@controller.instance_variable_defined?("@authenticated")
end
end
@@ -216,12 +216,12 @@ module AbstractController
end
test "when a callback is modified in a child with :only, it works for the :only action" do
- result = @controller.process(:index)
+ @controller.process(:index)
assert_equal "Hello world", @controller.response_body
end
test "when a callback is modified in a child with :only, it does not work for other actions" do
- result = @controller.process(:not_index)
+ @controller.process(:not_index)
assert_equal "", @controller.response_body
end
end
@@ -245,14 +245,14 @@ module AbstractController
assert_equal "Success", controller.response_body
end
end
-
+
class CallbacksWithArgs < ControllerWithCallbacks
set_callback :process_action, :before, :first
def first
@text = "Hello world"
end
-
+
def index(text)
self.response_body = @text + text
end
@@ -261,7 +261,7 @@ module AbstractController
class TestCallbacksWithArgs < ActiveSupport::TestCase
test "callbacks still work when invoking process with multiple args" do
controller = CallbacksWithArgs.new
- result = controller.process(:index, " Howdy!")
+ controller.process(:index, " Howdy!")
assert_equal "Hello world Howdy!", controller.response_body
end
end