Flowdock
method

include

Importance_2
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Example::Configuration

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:

include(*args) public

Declares modules to be included in multiple example groups (describe blocks). With no :type, the modules listed will be included in all example groups. Use :type to restrict the inclusion to a subset of example groups. The value assigned to :type should be a key that maps to a class that is either a subclass of Spec::Example::ExampleGroup or extends Spec::Example::ExampleGroupMethods and includes Spec::Example::ExampleMethods

  config.include(My::Pony, My::Horse, :type => :farm)

Only example groups that have that type will get the modules included:

  describe "Downtown", :type => :city do
    # Will *not* get My::Pony and My::Horse included
  end

  describe "Old Mac Donald", :type => :farm do
    # *Will* get My::Pony and My::Horse included
  end
Show source
Register or log in to add new notes.