lib/rspec/sleeping_king_studios/concerns/shared_example_group.rb
# Aliases a defined shared example group, allowing it to be accessed using
# a new name. The example group must be defined in the current context
# using `shared_examples`. The aliases must be defined before including the
# module into an example group, or they will not be available in the
# example group.
#
# @param [String] new_name The new name to alias the shared example group
#   as.
# @param [String] old_name The name under which the shared example group is
#   currently defined.
#
# @raise ArgumentError If the referenced shared example group does not
#   exist.
Aliases a defined shared example group, allowing it to be accessed using
a new name. The example group must be defined in the current context
using `shared_examples`. The aliases must be defined before including the
module into an example group, or they will not be available in the
example group.
Aliases a defined shared example group allowing it to be accessed using a new name . The example group must be defined in the current context using ` shared_examples ` . The aliases must be defined before including the module into an example group or they will not be available in the example group .
def example_group_definition example_group
      if example_group.is_a?(Proc)
        example_group
      elsif defined?(RSpec::Core::SharedExampleGroupModule) && example_group.is_a?(RSpec::Core::SharedExampleGroupModule)
        example_group.definition
      else
        nil
      end 
    end
def example_group_definition example_group if example_group . is_a? ( Proc ) example_group elsif defined? ( RSpec :: Core :: SharedExampleGroupModule ) && example_group . is_a? ( RSpec :: Core :: SharedExampleGroupModule ) example_group . definition else nil end end
Aliases a defined shared example group, allowing it to be accessed using
a new name.
Aliases a defined shared example group allowing it to be accessed using a new name .
# if-elsif-else
ArgumentError If the referenced shared example group does not exist.
ArgumentError If the referenced shared example group does not exist .
example_group
<not_specific>
<not_specific>
old_name The name under which the shared example group is currently defined.
old_name The name under which the shared example group is currently defined .