Flowdock
method

guard_against_redefining_existing_example_group

Importance_0
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Example::SharedExampleGroup

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.

guard_against_redefining_existing_example_group(new_example_group) private

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/example/shared_example_group.rb, line 24
        def guard_against_redefining_existing_example_group(new_example_group)
          existing_example_group = find_shared_example_group(new_example_group.description)
          return unless existing_example_group
          return if new_example_group.equal?(existing_example_group)
          return if spec_path(new_example_group) == spec_path(existing_example_group)
          raise ArgumentError.new("Shared Example '#{existing_example_group.description}' already exists")
        end
Register or log in to add new notes.