Module: Spec::Matchers::ModuleMethods

Included in:
Spec::Matchers
Defined in:
lib/gems/rspec-1.1.11/lib/spec/matchers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#last_matcherObject

Returns the value of attribute last_matcher.



137
138
139
# File 'lib/gems/rspec-1.1.11/lib/spec/matchers.rb', line 137

def last_matcher
  @last_matcher
end

#last_shouldObject

Returns the value of attribute last_should.



137
138
139
# File 'lib/gems/rspec-1.1.11/lib/spec/matchers.rb', line 137

def last_should
  @last_should
end

Instance Method Details

#clear_generated_descriptionObject



139
140
141
142
# File 'lib/gems/rspec-1.1.11/lib/spec/matchers.rb', line 139

def clear_generated_description
  self.last_matcher = nil
  self.last_should = nil
end

#generated_descriptionObject



144
145
146
147
# File 'lib/gems/rspec-1.1.11/lib/spec/matchers.rb', line 144

def generated_description
  last_should.nil? ? nil :
    "#{last_should} #{last_matcher.respond_to?(:description) ? last_matcher.description : 'NO NAME'}"
end