method

it

ruby latest stable - Class: MiniTest::Spec::DSL

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_1_10) is shown here.

it(desc = "anonymous", &block)
public

Define an expectation with name desc. Name gets morphed to a proper test method name. For some freakish reason, people who write specs don’t like class inheritance, so this goes way out of its way to make sure that expectations aren’t inherited.

This is also aliased to #specify and doesn’t require a desc arg.

Hint: If you do want inheritence, use minitest/unit. You can mix and match between assertions and expectations as much as you want.