class TestBelt::Matchers::HaveClassMethods::Matcher

Public Class Methods

new(method) click to toggle source
# File lib/test_belt/matchers/have_class_methods.rb, line 18
def initialize(method)
  unless method.kind_of?(::String) || method.kind_of?(::Symbol)
    raise ArgumentError, "please specify the method name using a string or symbol"
  end
  @method = method
end

Public Instance Methods

desc() click to toggle source
# File lib/test_belt/matchers/have_class_methods.rb, line 25
def desc
  "respond to class method ##{@method}"
end
test() click to toggle source
# File lib/test_belt/matchers/have_class_methods.rb, line 29
def test
  using(@method) do |method|
    assert subject.class.respond_to?(method, true), "#{subject.class.name} does not have the class method ##{method}"
  end
end