Module: StripTags::Matchers

Defined in:
lib/strip-tags/matchers.rb

Defined Under Namespace

Classes: StripTagsMatcher

Instance Method Summary collapse

Instance Method Details

#strip_tag(*attributes) ⇒ Object Also known as: strip_tags

RSpec Examples:

it { is_expected.to strip_tag(:first_name) }
it { is_expected.to strip_tags(:first_name, :last_name) }
it { is_expected.not_to strip_tag(:password) }
it { is_expected.not_to strip_tags(:password, :encrypted_password) }

Minitest Matchers Examples:

must { strip_tag(:first_name) }
must { strip_tags(:first_name, :last_name) }
wont { strip_tag(:password) }
wont { strip_tags(:password, :encrypted_password) }


16
17
18
# File 'lib/strip-tags/matchers.rb', line 16

def strip_tag(*attributes)
  StripTagsMatcher.new(attributes)
end