mirror of
https://github.com/github/rails.git
synced 2026-01-09 14:48:08 -05:00
adding a test for the runner module [#6027 state:resolved]
This commit is contained in:
22
actionpack/test/controller/runner_test.rb
Normal file
22
actionpack/test/controller/runner_test.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
require 'abstract_unit'
|
||||
require 'action_dispatch/testing/integration'
|
||||
|
||||
module ActionDispatch
|
||||
class RunnerTest < Test::Unit::TestCase
|
||||
class MyRunner
|
||||
include Integration::Runner
|
||||
|
||||
def initialize(session)
|
||||
@integration_session = session
|
||||
end
|
||||
|
||||
def hi; end
|
||||
end
|
||||
|
||||
def test_respond_to?
|
||||
runner = MyRunner.new(Class.new { def x; end }.new)
|
||||
assert runner.respond_to?(:hi)
|
||||
assert runner.respond_to?(:x)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user