aboutsummaryrefslogtreecommitdiffstats
path: root/spec/mspec/lib/mspec/matchers/have_constant.rb
blob: 6ec7c75b8581a6eb3dbeaced171a6ef55e00aa52 (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

module MSpecMatchers
  private def have_constant(variable)
    HaveConstantMatcher.new(variable)
  end
end