Skip to content

Commit

Permalink
fixup! For removing it_should_behave_like
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Feb 13, 2021
1 parent 6de8a44 commit 4abadd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions features/example_groups/shared_examples.feature
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ Feature: shared examples
And the output should contain:
"""
Array with 3 items
it should behave like a measurable object
behaves like a measurable object
should return 3 from #size
should return 3 from #length
String of 6 characters
it should behave like a measurable object
behaves like a measurable object
should return 6 from #size
should return 6 from #length
"""
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/core/example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def self.define_example_group_method(name, metadata={})
# @!scope class
#
# @see SharedExampleGroup
def self.define_nested_shared_group_method(new_name, report_label="it should behave like")
def self.define_nested_shared_group_method(new_name, report_label="behaves like")
idempotently_define_singleton_method(new_name) do |name, *args, &customization_block|
# Pass :caller so the :location metadata is set properly.
# Otherwise, it'll be set to the next line because that's
Expand All @@ -329,7 +329,7 @@ def self.define_nested_shared_group_method(new_name, report_label="it should beh

# Generates a nested example group and includes the shared content
# mapped to `name` in the nested group.
define_nested_shared_group_method :it_behaves_like, "behaves like"
define_nested_shared_group_method :it_behaves_like

# Includes shared content mapped to `name` directly in the group in which
# it is declared, as opposed to `it_behaves_like`, which creates a nested
Expand Down

0 comments on commit 4abadd5

Please sign in to comment.