Module: Spec::Example::ExampleGroupFactory::ClassMethods

Module | Spec::Example::ExampleGroupFactory::ClassMethods
In: | lib/spec/example/example_group_factory.rb

### Methods

[] create_example_group default determine_superclass example_group_creation_listeners register register_example_group reset

### Included Modules

Spec::Example::ArgsAndOptions

### Public Instance methods

[](key)
create_example_group(*args, &block)
default(example_group_class)

Sets the default ExampleGroup class

example_group_creation_listeners()
register(key, example_group_class)

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.

register_example_group(klass)
reset()

### Protected Instance methods

determine_superclass(opts)

[Validate]