class CapybaraMiniTestSpec::TestName

Represents the a matcher name. Returns different forms of the name depending on whether it is positive or negative.

Public Class Methods

new(name) click to toggle source
# File lib/capybara_minitest_spec/test_name.rb, line 8
def initialize(name)
  @original_name = name.to_s
end

Public Instance Methods

matcher(*args) click to toggle source
# File lib/capybara_minitest_spec/test_name.rb, line 12
def matcher(*args)
  send @original_name, *args
end

Private Instance Methods

has() click to toggle source
# File lib/capybara_minitest_spec/test_name.rb, line 18
def has
  have.sub /^have/, 'has'
end
have() click to toggle source
# File lib/capybara_minitest_spec/test_name.rb, line 22
def have
  @original_name
end