module RSpec::Core::Metadata::GroupMetadataHash
def described_class
def described_class warn_about_first_description_arg_behavioral_change_in_rspec_3 value_for_rspec_2 = described_class_for_rspec_2 value_for_rspec_3 = described_class_for_rspec_3 if value_for_rspec_2 != value_for_rspec_3 RSpec.warn_deprecation(<<-EOS.gsub(/^\s+\|/, '')) |The semantics of `described_class` in a nested `describe <SomeClass>` |example group are changing in RSpec 3. In RSpec 2.x, `described_class` |would return the outermost described class (#{value_for_rspec_2.inspect}). |In RSpec 3, it will return the innermost described class (#{value_for_rspec_3.inspect}). |In general, we recommend not describing multiple classes or objects in a |nested manner as it creates confusion. | |To make your code compatible with RSpec 3, change from `described_class` to a reference |to `#{value_for_rspec_3.inspect}`, or change the arg of the inner `describe` to a string. |(Called from #{CallerFilter.first_non_rspec_line}) EOS end value_for_rspec_2 end