test/gravaty/utils/test_rfc5322.rb in gravaty-9.0.1 vs test/gravaty/utils/test_rfc5322.rb in gravaty-10.0.0

- old
+ new

@@ -1,8 +1,8 @@ #-- # gravaty -# Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani +# Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani # # This file is part of gravaty. # # gravaty is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -21,11 +21,11 @@ require_relative '../../test_helper' describe Gravaty::Utils::Rfc5322 do describe 'when passed a nil email address' do it 'must return nil' do - Gravaty::Utils::Rfc5322::EMAIL.match(nil).must_be_nil + _(Gravaty::Utils::Rfc5322::EMAIL.match(nil)).must_be_nil end end describe 'when passed an invalid email address, according to RF5322' do @@ -41,11 +41,11 @@ # characters (the double-quote characters appearing as quoted-pair # constructs). ['-.', 'Joe Q. Public <john.q.public@example.com>'] .each do |invalid_address| it "must return nil for '#{invalid_address}' invalid address" do - assert_nil Gravaty::Utils::Rfc5322::EMAIL.match invalid_address + _(Gravaty::Utils::Rfc5322::EMAIL.match invalid_address).must_be_nil end end end describe 'when passed a valid email address, according to RF5322' do @@ -73,10 +73,10 @@ '"Giant; \"Big\" Box" <sysservices@example.net>', 'A Group:Ed Jones <c@a.test>,joe@where.test,John <jdoe@one.test>;', 'Pete(A nice \) chap) <pete(his account)@silly.test(his host)>'] .each do |address| it "must match the valid '#{address}' email address" do - refute_nil Gravaty::Utils::Rfc5322::EMAIL.match address + _(Gravaty::Utils::Rfc5322::EMAIL.match address).wont_be_nil end end end end