class SubclassSetupAndTeardownTest

Public Instance Methods

test_inherited_setup_callbacks() click to toggle source
# File activesupport/test/test_case_test.rb, line 278
def test_inherited_setup_callbacks
  assert_equal [:reset_callback_record, :foo, :bar], self.class._setup_callbacks.map(&:raw_filter)
  assert_equal [:foo, :bar], @called_back
  assert_equal [:foo, :sentinel, :bar], self.class._teardown_callbacks.map(&:raw_filter)
end

Private Instance Methods

bar() click to toggle source
# File activesupport/test/test_case_test.rb, line 285
def bar
  @called_back << :bar
end
sentinel() click to toggle source
# File activesupport/test/test_case_test.rb, line 289
def sentinel
  assert_equal [:foo, :bar, :bar], @called_back
end