# File lib/rspec/core/subject.rb, line 120 def its(attribute, &block) describe(attribute) do example do self.class.class_eval do define_method(:subject) do @_subject ||= if attribute.is_a?(Array) super()[*attribute] else attribute.to_s.split('.').inject(super()) do |target, method| target.send(method) end end end end instance_eval(&block) end end end