Class: Spec::Example::SharedExampleGroup

Inherits:
Module
  • Object
show all
Extended by:
ClassMethods
Includes:
ExampleGroupMethods
Defined in:
lib/spec/example/shared_example_group.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary

Attributes included from ExampleGroupMethods

#location

Attributes included from Spec::Example::Subject::ExampleGroupMethods

#explicit_subject_block

Instance Method Summary collapse

Methods included from ClassMethods

clear, count, find, include?, register

Methods included from ExampleGroupMethods

build_description_from, #describe, #described_class, #described_type, #description, #description_args, #description_parts, #example, #example_group_hierarchy, #example_implementations, #example_proxies, #examples, #include_constants_in, #inherited, #it_should_behave_like, #let, #nested_descriptions, #notify, #number_of_examples, #options, #pending_implementation, #run, #set_description, #xexample

Methods included from ArgsAndOptions

#add_options, #args_and_options, #set_location

Methods included from PredicateMatchers

#define_methods_from_predicate_matchers, #predicate_matchers

Methods included from Spec::Example::Subject::ExampleGroupMethods

#its, #subject

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

Constructor Details

#initialize(*args, &example_group_block) ⇒ SharedExampleGroup

Returns a new instance of SharedExampleGroup.



49
50
51
52
# File '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/spec/example/shared_example_group.rb', line 54

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