Flowdock
method

register

Importance_1
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Example::ExampleGroupFactory

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:

register(key, example_group_class) public

Registers an example group class klass with the symbol type. For example:

  Spec::Example::ExampleGroupFactory.register(:farm, FarmExampleGroup)

With that you can append a hash with :type => :farm to the describe method and it will load an instance of FarmExampleGroup.

  describe Pig, :type => :farm do
    ...

If you don’t use the hash explicitly, describe will implicitly use an instance of FarmExampleGroup for any file loaded from the ./spec/farm directory.

Show source
Register or log in to add new notes.