method
register

1.1.4 -
Show latest stable
-
0 notes -
Class: Spec::Example::ExampleGroupFactory
- 1.1.4 (0)
- 1.1.12
- 1.2.0
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
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.