@@ -77,14 +77,14 @@ module Support
77
77
guards = described_class . new ( example )
78
78
guards . add_condition ( :foo , false )
79
79
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"}; ' ]
81
81
end
82
82
83
83
it 'is skipped without provided reason' , exclusive : { foo : true } do |example |
84
84
guards = described_class . new ( example )
85
85
guards . add_condition ( :foo , false )
86
86
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"}; '
88
88
expect ( guards . disposition ) . to eq [ :skip , message ]
89
89
end
90
90
end
@@ -138,7 +138,7 @@ module Support
138
138
describe '#new' do
139
139
it 'requires guarded Hash and type' do
140
140
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' )
142
142
expect ( guard . type ) . to eq :only
143
143
end
144
144
@@ -157,7 +157,7 @@ module Support
157
157
it 'defaults to no reason given' do
158
158
guard = described_class . new ( { } , :only )
159
159
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"}; ' )
161
161
end
162
162
163
163
it 'accepts integer' do |example |
@@ -170,7 +170,7 @@ module Support
170
170
it 'accepts String' do
171
171
guard = described_class . new ( { reason : 'because' } , :only )
172
172
173
- expect ( guard . message ) . to eq ( 'Test guarded; because' )
173
+ expect ( guard . message ) . to eq ( 'Test guarded; Guarded by {:reason=>" because"}; ' )
174
174
end
175
175
176
176
it 'accepts Symbol of known message' do
@@ -190,19 +190,20 @@ module Support
190
190
it 'has special message for exclude' do
191
191
guard = described_class . new ( { reason : 'because' } , :exclude )
192
192
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"}; ' )
194
194
end
195
195
196
196
it 'has special message for flaky' do
197
197
guard = described_class . new ( { reason : 'because' } , :flaky )
198
198
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 )
200
201
end
201
202
202
203
it 'has special message for exclusive' do
203
204
guard = described_class . new ( { reason : 'because' } , :exclusive )
204
205
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"}; ' )
206
207
end
207
208
end
208
209
end
0 commit comments