Methods
- B
- F
- R
- T
Included Modules
Instance Public methods
build_class(callback)
Link
foo()
Link
run()
Link
test_class()
Link
FIXME: do we really want to support classes as conditionals? There were no tests for it previous to this.
test_class_conditional_with_scope()
Link
FIXME: do we really want to support classes as conditionals? There were no tests for it previous to this.
# File activesupport/test/callbacks_test.rb, line 821 def test_class_conditional_with_scope z = [] callback = Class.new { define_singleton_method(:foo) { |o| z << o } } klass = Class.new { include ActiveSupport::Callbacks define_callbacks :foo, :scope => [:name] set_callback :foo, :before, :foo, :if => callback def run; run_callbacks :foo; end private def foo; end } object = klass.new object.run assert_equal [object], z end
test_proc_arity0()
Link
test_proc_arity1()
Link
test_proc_arity2()
Link