aboutsummaryrefslogtreecommitdiffstats
path: root/spec/mspec/lib/mspec/matchers/have_constant.rb
blob: df95219e5341759f3abd6572d7bfa68bb975dea4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require 'mspec/matchers/variable'

class HaveConstantMatcher < VariableMatcher
  self.variables_method = :constants
  self.description      = 'constant'
end

class Object
  def have_constant(variable)
    HaveConstantMatcher.new(variable)
  end
end