@@ -34,79 +34,80 @@ module Support
3434
3535 context 'with single guard' do
3636 describe '#exclude' do
37- it 'ignores an unrecognized guard parameter' , invalid : { condition : :guarded } do
37+ it 'ignores an unrecognized guard parameter' , invalid : { condition : :guarded } do
3838 # pass
3939 end
4040
41- it 'skips without running' , exclude : { condition : :guarded } do
41+ it 'skips without running' , exclude : { condition : :guarded } do
4242 raise 'This code will not get executed so it will not fail'
4343 end
4444 end
4545
4646 describe '#flaky' do
47- it 'skips without running' , flaky : { condition : :guarded } do
47+ it 'skips without running' , flaky : { condition : :guarded } do
4848 raise 'This code will not get executed so it will not fail'
4949 end
5050 end
5151
5252 describe '#exclusive' do
53- it 'skips without running if it does not match' , exclusive : { condition : :not_guarded } do
53+ it 'skips without running if it does not match' , exclusive : { condition : :not_guarded } do
5454 raise 'This code will not get executed so it will not fail'
5555 end
5656
57- it 'does not guard if it does match' , exclusive : { condition : :guarded } do
57+ it 'does not guard if it does match' , exclusive : { condition : :guarded } do
5858 # pass
5959 end
6060 end
6161
6262 describe '#only' do
63- it 'guards when value does not match' , only : { condition : :not_guarded } do
63+ it 'guards when value does not match' , only : { condition : :not_guarded } do
6464 raise 'This code is executed but expected to fail'
6565 end
6666
67- it 'does not guard when value matches' , only : { condition : :guarded } do
67+ it 'does not guard when value matches' , only : { condition : :guarded } do
6868 # pass
6969 end
7070 end
7171
7272 describe '#except' do
73- it 'guards when value matches and test fails' , except : { condition : :guarded } do
73+ it 'guards when value matches and test fails' , except : { condition : :guarded } do
7474 raise 'This code is executed but expected to fail'
7575 end
7676
77- it 'does not guard when value does not match and test passes' , except : { condition : :not_guarded } do
77+ it 'does not guard when value does not match and test passes' , except : { condition : :not_guarded } do
7878 # pass
7979 end
8080 end
8181 end
8282
8383 context 'when multiple guards' do
84- it 'guards if neither only nor except match and test fails' , except : { condition : :not_guarded } ,
85- only : { condition : :not_guarded } do
84+ it 'guards if neither only nor except match and test fails' , except : { condition : :not_guarded } ,
85+ only : { condition : :not_guarded } do
8686 raise 'This code is executed but expected to fail'
8787 end
8888
89- it 'guards if both only and except match' , except : { condition : :guarded } , only : { condition : :guarded } do
89+ it 'guards if both only and except match' , except : { condition : :guarded } , only : { condition : :guarded } do
9090 raise 'This code is executed but expected to fail'
9191 end
9292
93- it 'guards if except matches and only does not' , except : { condition : :guarded } , only : { condition : :not_guarded } do
93+ it 'guards if except matches and only does not' , except : { condition : :guarded } ,
94+ only : { condition : :not_guarded } do
9495 raise 'This code is executed but expected to fail'
9596 end
9697
97- it 'does not guard if only matches and except does not' , except : { condition : :not_guarded } ,
98- only : { condition : :guarded } do
98+ it 'does not guard if only matches and except does not' , except : { condition : :not_guarded } ,
99+ only : { condition : :guarded } do
99100 # pass
100101 end
101102
102- it 'gives correct reason' , except : [ { condition : :guarded , reason : 'bug1' } ,
103- { condition : :not_guarded , reason : 'bug2' } ] do
103+ it 'gives correct reason' , except : [ { condition : :guarded , reason : 'bug1' } ,
104+ { condition : :not_guarded , reason : 'bug2' } ] do
104105 raise 'This code is executed but expected to fail'
105106 end
106107 end
107108
108109 context 'when array of hashes' do
109- it 'guards if any Hash value is satisfied' , only : [ { condition : :guarded } , { condition : :not_guarded } ] do
110+ it 'guards if any Hash value is satisfied' , only : [ { condition : :guarded } , { condition : :not_guarded } ] do
110111 raise 'This code is executed but expected to fail'
111112 end
112113 end
0 commit comments