Class: RSpec::Core::ExampleGroup::DescriptionBehaviorChange

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/core/example_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argObject

Returns the value of attribute arg

Returns:

  • (Object)

    the current value of arg



348
349
350
# File 'lib/rspec/core/example_group.rb', line 348

def arg
  @arg
end

#call_siteObject

Returns the value of attribute call_site

Returns:

  • (Object)

    the current value of call_site



348
349
350
# File 'lib/rspec/core/example_group.rb', line 348

def call_site
  @call_site
end

Instance Method Details

#warningObject



349
350
351
352
353
354
355
356
357
358
# File 'lib/rspec/core/example_group.rb', line 349

def warning
  <<-EOS.gsub(/^\s+\|/, '')
    |The semantics of `describe <a #{arg.class.name}>` are changing in RSpec 3. In RSpec 2,
    |this would be treated as metadata, but as the first `describe` argument,
    |this will be treated as the described object (affecting the value of
    |`described_class`) in RSpec 3. If you want this to be treated as metadata,
    |pass a description as the first argument.
    |(Example group defined at #{call_site})
  EOS
end