# File lib/mspec/matchers/variable.rb, line 10definitialize(variable)
@variable = convert_name(variable)
end
Public Instance Methods
failure_message()click to toggle source
# File lib/mspec/matchers/variable.rb, line 19deffailure_message
["Expected #{@object} to have #{self.class.description} '#{@variable}'",
"but it does not"]
end
matches?(object)click to toggle source
# File lib/mspec/matchers/variable.rb, line 14defmatches?(object)
@object = object@object.send(self.class.variables_method).include?@variableend
negative_failure_message()click to toggle source
# File lib/mspec/matchers/variable.rb, line 24defnegative_failure_message
["Expected #{@object} NOT to have #{self.class.description} '#{@variable}'",
"but it does"]
end