blob: f83c803a26d5917d57165e4210094f94cf70053b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
require 'mspec/matchers/variable'
class HaveInstanceVariableMatcher < VariableMatcher
self.variables_method = :instance_variables
self.description = 'instance variable'
end
class Object
def have_instance_variable(variable)
HaveInstanceVariableMatcher.new(variable)
end
end
|