Class: RSpec2MiniTest::TestName

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec2minitest/test_name.rb

Direct Known Subclasses

NegativeTestName, PositiveTestName

Instance Method Summary collapse

Constructor Details

#initialize(matcher_name, matcher_module: nil, assertion_prefix: nil) ⇒ TestName

Returns a new instance of TestName.



3
4
5
6
7
8
# File 'lib/rspec2minitest/test_name.rb', line 3

def initialize(matcher_name, matcher_module: nil, assertion_prefix: nil)
  extend matcher_module if matcher_module

  @matcher_name = matcher_name.to_s
  @assertion_prefix = assertion_prefix
end

Instance Method Details

#matcher(*args) ⇒ Object



10
11
12
# File 'lib/rspec2minitest/test_name.rb', line 10

def matcher(*args)
  send @matcher_name, *args
end