@@ -386,29 +386,29 @@ def test_default_signature
386
386
end
387
387
388
388
def test_ident
389
- assert_equal ( nil , @repo . ident [ :name ] )
390
- assert_equal ( nil , @repo . ident [ :email ] )
389
+ assert_nil ( @repo . ident [ :name ] )
390
+ assert_nil ( @repo . ident [ :email ] )
391
391
392
392
@repo . ident = { name : "Other User" }
393
393
assert_equal ( "Other User" , @repo . ident [ :name ] )
394
- assert_equal ( nil , @repo . ident [ :email ] )
394
+ assert_nil ( @repo . ident [ :email ] )
395
395
396
396
@repo . ident = { email :
"[email protected] " }
397
- assert_equal ( nil , @repo . ident [ :name ] )
397
+ assert_nil ( @repo . ident [ :name ] )
398
398
assert_equal ( "[email protected] " , @repo . ident [ :email ] )
399
399
400
400
@repo . ident = { name :
"Other User" , email :
"[email protected] " }
401
401
assert_equal ( "Other User" , @repo . ident [ :name ] )
402
402
assert_equal ( "[email protected] " , @repo . ident [ :email ] )
403
403
404
404
@repo . ident = { }
405
- assert_equal ( nil , @repo . ident [ :name ] )
406
- assert_equal ( nil , @repo . ident [ :email ] )
405
+ assert_nil ( @repo . ident [ :name ] )
406
+ assert_nil ( @repo . ident [ :email ] )
407
407
408
408
@repo . ident = { name :
"Other User" , email :
"[email protected] " }
409
409
@repo . ident = nil
410
- assert_equal ( nil , @repo . ident [ :name ] )
411
- assert_equal ( nil , @repo . ident [ :email ] )
410
+ assert_nil ( @repo . ident [ :name ] )
411
+ assert_nil ( @repo . ident [ :email ] )
412
412
end
413
413
end
414
414
@@ -635,7 +635,7 @@ def test_changing_namespace
635
635
assert_equal "foo/bar" , @repo . namespace
636
636
637
637
@repo . namespace = nil
638
- assert_equal nil , @repo . namespace
638
+ assert_nil @repo . namespace
639
639
end
640
640
641
641
def test_refs_in_namespaces
@@ -714,7 +714,7 @@ def test_read_attributes_internal
714
714
assert_equal 'text' , @repo . fetch_attributes ( 'new.txt' , 'linguist-lang' )
715
715
assert_equal 'this' , @repo . fetch_attributes ( 'new.txt' , 'other-attr' )
716
716
assert_equal true , @repo . fetch_attributes ( 'README' , 'is_readme' )
717
- assert_equal nil , @repo . fetch_attributes ( 'README' , 'linguist-lang' )
717
+ assert_nil @repo . fetch_attributes ( 'README' , 'linguist-lang' )
718
718
end
719
719
720
720
def test_read_attributes_internal_multi
@@ -743,16 +743,16 @@ def test_attributes
743
743
744
744
atr = @repo . attributes ( 'branch_file.txt' )
745
745
assert_equal 'text' , atr [ 'linguist-lang' ]
746
- assert_equal nil , atr [ 'other-attr' ]
746
+ assert_nil atr [ 'other-attr' ]
747
747
748
748
atr . each do |key , value |
749
749
assert key . instance_of? String
750
750
assert [ String , TrueClass , FalseClass ] . include? value . class
751
751
end
752
752
753
753
atr = @repo . attributes ( 'new.txt' , :priority => [ :index ] )
754
- assert_equal nil , atr [ 'linguist-lang' ]
755
- assert_equal nil , atr [ 'linguist-lang' ]
754
+ assert_nil atr [ 'linguist-lang' ]
755
+ assert_nil atr [ 'linguist-lang' ]
756
756
end
757
757
end
758
758
0 commit comments