method

describe

Importance_2
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Extensions::Main

Method deprecated or moved

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

These similar methods exist in 1.3.1:

describe(*args, &block) public

Creates and returns a class that includes the ExampleGroupMethods module. Which ExampleGroup type is created depends on the directory of the file calling this method. For example, Spec::Rails will use different classes for specs living in spec/models, spec/helpers, spec/views and spec/controllers.

It is also possible to override autodiscovery of the example group type with an options Hash as the last argument:

  describe "name", :type => :something_special do ...

The reason for using different behaviour classes is to have different matcher methods available from within the describe block.

See Spec::Example::ExampleFactory#register for details about how to register special implementations.

Show source
Register or log in to add new notes.