Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Misleading warning when calling shared_examples_for within another shared_examples_for block #828

@jmuheim

Description

@jmuheim

A co-worker accidently called shared_examples_for within another shared_examples_for block. This lead to this confusing warning:

WARNING: Shared example group 'all filterable and searchable lists' has been previously defined at:
  /Users/josh/Documents/Work/Sientia/iq/spec/support/shared_examples/activity_list_examples.rb:225
...and you are now defining it at:
  /Users/josh/Documents/Work/Sientia/iq/spec/support/shared_examples/activity_list_examples.rb:225
The new definition will overwrite the original one.

This warning is printed out for every spec that calls the shared example (except the first one).

Maybe you want to add some mechanism that prevents this problem.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions