@@ -77,14 +77,14 @@ module Support
7777 guards = described_class . new ( example )
7878 guards . add_condition ( :foo , false )
7979
80- expect ( guards . disposition ) . to eq [ :pending , 'Test guarded; no reason given' ]
80+ expect ( guards . disposition ) . to eq [ :pending , 'Test guarded; Guarded by {:foo=>false, : reason=>"No reason given"}; ' ]
8181 end
8282
8383 it 'is skipped without provided reason' , exclusive : { foo : true } do |example |
8484 guards = described_class . new ( example )
8585 guards . add_condition ( :foo , false )
8686
87- message = 'Test does not apply to this configuration; no reason given'
87+ message = 'Test does not apply to this configuration; Guarded by {:foo=>true, : reason=>"No reason given"}; '
8888 expect ( guards . disposition ) . to eq [ :skip , message ]
8989 end
9090 end
@@ -138,7 +138,7 @@ module Support
138138 describe '#new' do
139139 it 'requires guarded Hash and type' do
140140 guard = described_class . new ( { foo : 7 } , :only )
141- expect ( guard . guarded ) . to eq ( foo : 7 )
141+ expect ( guard . guarded ) . to eq ( foo : 7 , reason : 'No reason given' )
142142 expect ( guard . type ) . to eq :only
143143 end
144144
@@ -157,7 +157,7 @@ module Support
157157 it 'defaults to no reason given' do
158158 guard = described_class . new ( { } , :only )
159159
160- expect ( guard . message ) . to eq ( 'Test guarded; no reason given' )
160+ expect ( guard . message ) . to eq ( 'Test guarded; Guarded by {: reason=>"No reason given"}; ' )
161161 end
162162
163163 it 'accepts integer' do |example |
@@ -170,7 +170,7 @@ module Support
170170 it 'accepts String' do
171171 guard = described_class . new ( { reason : 'because' } , :only )
172172
173- expect ( guard . message ) . to eq ( 'Test guarded; because' )
173+ expect ( guard . message ) . to eq ( 'Test guarded; Guarded by {:reason=>" because"}; ' )
174174 end
175175
176176 it 'accepts Symbol of known message' do
@@ -190,19 +190,20 @@ module Support
190190 it 'has special message for exclude' do
191191 guard = described_class . new ( { reason : 'because' } , :exclude )
192192
193- expect ( guard . message ) . to eq ( 'Test skipped because it breaks test run; because' )
193+ expect ( guard . message ) . to eq ( 'Test skipped because it breaks test run; Guarded by {:reason=>" because"}; ' )
194194 end
195195
196196 it 'has special message for flaky' do
197197 guard = described_class . new ( { reason : 'because' } , :flaky )
198198
199- expect ( guard . message ) . to eq ( 'Test skipped because it is unreliable in this configuration; because' )
199+ msg = 'Test skipped because it is unreliable in this configuration; Guarded by {:reason=>"because"};'
200+ expect ( guard . message ) . to eq ( msg )
200201 end
201202
202203 it 'has special message for exclusive' do
203204 guard = described_class . new ( { reason : 'because' } , :exclusive )
204205
205- expect ( guard . message ) . to eq ( 'Test does not apply to this configuration; because' )
206+ expect ( guard . message ) . to eq ( 'Test does not apply to this configuration; Guarded by {:reason=>" because"}; ' )
206207 end
207208 end
208209 end
0 commit comments