module Spec::Extensions::Main

def describe(*args, &block)


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

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

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

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

spec/controllers.
spec/helpers, spec/views and
classes for specs living in spec/models,
calling this method. For example, Spec::Rails will use different
module. Which ExampleGroup type is created depends on the directory of the file
Creates and returns a class that includes the ExampleGroupMethods
def describe(*args, &block)
  raise ArgumentError if args.empty?
  raise ArgumentError unless block
  args << {} unless Hash === args.last
  args.last[:spec_path] = caller(0)[1]
  Spec::Example::ExampleGroupFactory.create_example_group(*args, &block)
end