Skip to content

Commit

Permalink
Update: only if a first argument of example is String obejct, example…
Browse files Browse the repository at this point in the history
… recognize it as description
  • Loading branch information
eisukeyeongjo committed Mar 5, 2024
1 parent 1e661db commit 14d517e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rspec/core/example_group.rb
Expand Up @@ -144,7 +144,8 @@ def described_class
#
def self.define_example_method(name, extra_options={})
idempotently_define_singleton_method(name) do |*all_args, &block|
desc, *args = *all_args
desc = all_args.shift if all_args.first.is_a? String
args = all_args

options = Metadata.build_hash_from(args)
options.update(:skip => RSpec::Core::Pending::NOT_YET_IMPLEMENTED) unless block
Expand Down

0 comments on commit 14d517e

Please sign in to comment.