Class: Spec::Example::SharedExampleGroup

Inherits:
Module show all
Extended by:
ClassMethods
Includes:
ExampleGroupMethods
Defined in:
lib/gems/rspec-1.1.12/lib/spec/example/shared_example_group.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary

Attributes included from ExampleGroupMethods

#description_options, #spec_path

Instance Method Summary collapse

Methods included from ClassMethods

clear, count, find, include?, register

Methods included from ExampleGroupMethods

#all_before_each_parts, #backtrace, #create_example_group_subclass, #create_shared_example_group, #describe, #described_type, #description, #description_args, #description_parts, description_text, #example, #example_group_backtrace, example_group_creation_listeners, #examples, #inherited, #it_should_behave_like, #number_of_examples, #predicate_matchers, #register_example_group, #reset, #run, #run_after_each, #run_before_each, #set_description, #subject, #subject_block, #xexample

Methods included from BeforeAndAfterHooks

#after_all_parts, #after_each_parts, after_suite_parts, #after_suite_parts, #append_after, #append_before, #before_all_parts, #before_each_parts, #before_suite_parts, before_suite_parts, #prepend_after, #prepend_before, #remove_after, #setup, #teardown

Methods inherited from Module

#abstract_method, #append_features, #blankslate_original_append_features, #flexmock_deprecate, #logger_name

Constructor Details

#initialize(*args, &example_group_block) ⇒ SharedExampleGroup

Returns a new instance of SharedExampleGroup.



49
50
51
52
# File 'lib/gems/rspec-1.1.12/lib/spec/example/shared_example_group.rb', line 49

def initialize(*args, &example_group_block)
  set_description(*args)
  @example_group_block = example_group_block
end

Instance Method Details

#included(mod) ⇒ Object

:nodoc:



54
55
56
# File 'lib/gems/rspec-1.1.12/lib/spec/example/shared_example_group.rb', line 54

def included(mod) # :nodoc:
  mod.module_eval(&@example_group_block)
end