@@ -92,7 +92,7 @@ module ThreadSafe
92
92
late_compute_threads = Array . new ( late_compute_threads_count ) do
93
93
Thread . new do
94
94
block_until_compute_started . call ( 'compute_if_absent' )
95
- expect ( 1 ) . to eq @cache . compute_if_absent ( :a ) { flunk }
95
+ expect ( 1 ) . to eq @cache . compute_if_absent ( :a ) { fail }
96
96
end
97
97
end
98
98
@@ -132,7 +132,7 @@ module ThreadSafe
132
132
expect_no_size_change do
133
133
expect ( nil ) . to eq @cache . compute_if_present ( :a ) { }
134
134
expect ( nil ) . to eq @cache . compute_if_present ( :a ) { 1 }
135
- expect ( nil ) . to eq @cache . compute_if_present ( :a ) { flunk }
135
+ expect ( nil ) . to eq @cache . compute_if_present ( :a ) { fail }
136
136
expect ( false ) . to eq @cache . key? ( :a )
137
137
end
138
138
@@ -220,7 +220,7 @@ module ThreadSafe
220
220
it 'common' do
221
221
with_or_without_default_proc do
222
222
expect_size_change ( 1 ) do
223
- expect ( nil ) . to eq @cache . merge_pair ( :a , nil ) { flunk }
223
+ expect ( nil ) . to eq @cache . merge_pair ( :a , nil ) { fail }
224
224
expect ( true ) . to eq @cache . key? ( :a )
225
225
expect ( nil ) . to eq @cache [ :a ]
226
226
end
@@ -489,7 +489,7 @@ def key # assert_collision_resistance expects to be able to call .key to get the
489
489
490
490
@cache [ :a ] = 1
491
491
expect_no_size_change do
492
- expect ( 1 ) . to eq @cache . fetch ( :a ) { flunk }
492
+ expect ( 1 ) . to eq @cache . fetch ( :a ) { fail }
493
493
end
494
494
495
495
expect { @cache . fetch ( :b ) } . to raise_error ( ThreadSafe ::Cache ::KEY_ERROR )
@@ -515,7 +515,7 @@ def key # assert_collision_resistance expects to be able to call .key to get the
515
515
@cache [ :a ] = nil
516
516
expect_no_size_change do
517
517
expect ( true ) . to eq @cache . key? ( :a )
518
- expect ( nil ) . to eq @cache . fetch ( :a ) { flunk }
518
+ expect ( nil ) . to eq @cache . fetch ( :a ) { fail }
519
519
end
520
520
end
521
521
end
@@ -551,7 +551,7 @@ def key # assert_collision_resistance expects to be able to call .key to get the
551
551
end
552
552
553
553
expect_no_size_change do
554
- expect ( 1 ) . to eq @cache . fetch_or_store ( :a ) { flunk }
554
+ expect ( 1 ) . to eq @cache . fetch_or_store ( :a ) { fail }
555
555
end
556
556
557
557
expect { @cache . fetch_or_store ( :b ) } .
@@ -597,7 +597,7 @@ def key # assert_collision_resistance expects to be able to call .key to get the
597
597
598
598
@cache [ :a ] = nil
599
599
expect_no_size_change do
600
- expect ( nil ) . to eq @cache . fetch_or_store ( :a ) { flunk }
600
+ expect ( nil ) . to eq @cache . fetch_or_store ( :a ) { fail }
601
601
end
602
602
end
603
603
end
@@ -625,7 +625,7 @@ def key # assert_collision_resistance expects to be able to call .key to get the
625
625
626
626
describe '#each_pair' do
627
627
it 'common' do
628
- @cache . each_pair { |k , v | flunk }
628
+ @cache . each_pair { |k , v | fail }
629
629
expect ( @cache ) . to eq @cache . each_pair { }
630
630
@cache [ :a ] = 1
631
631
@@ -647,7 +647,7 @@ def key # assert_collision_resistance expects to be able to call .key to get the
647
647
if i == 0
648
648
i += 1
649
649
next
650
- flunk
650
+ fail
651
651
elsif i == 1
652
652
break :breaked
653
653
end
@@ -690,7 +690,7 @@ def key # assert_collision_resistance expects to be able to call .key to get the
690
690
end
691
691
692
692
it '#each_key' do
693
- expect ( @cache ) . to eq @cache . each_key { flunk }
693
+ expect ( @cache ) . to eq @cache . each_key { fail }
694
694
695
695
@cache [ 1 ] = 1
696
696
arr = [ ]
@@ -704,7 +704,7 @@ def key # assert_collision_resistance expects to be able to call .key to get the
704
704
end
705
705
706
706
it '#each_value' do
707
- expect ( @cache ) . to eq @cache . each_value { flunk }
707
+ expect ( @cache ) . to eq @cache . each_value { fail }
708
708
709
709
@cache [ 1 ] = 1
710
710
arr = [ ]
0 commit comments