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, assertion_prefix) ⇒ TestName

Returns a new instance of TestName.



5
6
7
8
9
10
# File 'lib/rspec2minitest/test_name.rb', line 5

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

  @matcher_name = matcher_name.to_s
  @assertion_prefix = assertion_prefix && "#{assertion_prefix}_" || ''
end

Instance Method Details

#matcher(*args) ⇒ Object



12
13
14
# File 'lib/rspec2minitest/test_name.rb', line 12

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