ActiveSupport::Testing::Declarative

module ActiveSupport::Testing::Declarative

Public Instance Methods

test(name, &block) Show source

Helper to define a test method using a String. Under the hood, it replaces spaces with underscores and defines the test method.

test "verify something" do
  ...
end
# File activesupport/lib/active_support/testing/declarative.rb, line 11
def test(name, &block)
  test_name = "test_