Class: TestBelt::Matchers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/test_belt/matchers/base.rb

Overview

Test Belt provides matchers to test common scenarios. Use these matchers in combination with the ‘should’ method to run common tests. All matchers should subclass this base class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args.



8
9
10
# File 'lib/test_belt/matchers/base.rb', line 8

def args
  @args
end

Instance Method Details

#descObject

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/test_belt/matchers/base.rb', line 10

def desc
  raise NotImplementedError, "provide a 'desc' method"
end

#testObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/test_belt/matchers/base.rb', line 14

def test
  raise NotImplementedError, "provide a 'test' method that returns a Proc that runs the matcher test"
end