Class: SpecForge::Matchers

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/spec_forge/matchers.rb

Overview

Provides custom RSpec matchers for SpecForge

This singleton class is responsible for defining custom RSpec matchers that can be used in SpecForge tests. It makes these matchers available through RSpec's matcher system.

Examples:

Defining all matchers

SpecForge::Matchers.define

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.defineObject

Defines all custom matchers for use in SpecForge tests

This is the main entry point that should be called once during initialization to make all custom matchers available.



23
24
25
# File 'lib/spec_forge/matchers.rb', line 23

def self.define
  instance.define_all
end

Instance Method Details

#define_allObject

Defines all available custom matchers

This method calls individual definition methods for each custom matcher supported by SpecForge.



33
34
35
36
# File 'lib/spec_forge/matchers.rb', line 33

def define_all
  define_forge_and
  define_have_size
end