|
93 | 93 | subject { config.for_hook('SomeHook', 'PreCommit') }
|
94 | 94 |
|
95 | 95 | it 'returns the subset of the config for the specified hook' do
|
96 |
| - subject['enabled'].should be_true |
97 |
| - subject['quiet'].should be_false |
| 96 | + subject['enabled'].should == true |
| 97 | + subject['quiet'].should == false |
98 | 98 | end
|
99 | 99 |
|
100 | 100 | it 'merges the the hook config with the ALL section' do
|
101 |
| - subject['required'].should be_false |
| 101 | + subject['required'].should == false |
102 | 102 | end
|
103 | 103 | end
|
104 | 104 |
|
|
213 | 213 | let(:env) { { 'SKIP' => 'AuthorName' } }
|
214 | 214 |
|
215 | 215 | it 'sets the skip option of the hook to true' do
|
216 |
| - subject.for_hook('AuthorName', 'PreCommit')['skip'].should be_true |
| 216 | + subject.for_hook('AuthorName', 'PreCommit')['skip'].should == true |
217 | 217 | end
|
218 | 218 |
|
219 | 219 | context 'and the hook is spelt with underscores' do
|
220 | 220 | let(:env) { { 'SKIP' => 'author_name' } }
|
221 | 221 |
|
222 | 222 | it 'sets the skip option of the hook to true' do
|
223 |
| - subject.for_hook('AuthorName', 'PreCommit')['skip'].should be_true |
| 223 | + subject.for_hook('AuthorName', 'PreCommit')['skip'].should == true |
224 | 224 | end
|
225 | 225 | end
|
226 | 226 |
|
227 | 227 | context 'and the hook is spelt with hyphens' do
|
228 | 228 | let(:env) { { 'SKIP' => 'author-name' } }
|
229 | 229 |
|
230 | 230 | it 'sets the skip option of the hook to true' do
|
231 |
| - subject.for_hook('AuthorName', 'PreCommit')['skip'].should be_true |
| 231 | + subject.for_hook('AuthorName', 'PreCommit')['skip'].should == true |
232 | 232 | end
|
233 | 233 | end
|
234 | 234 | end
|
|
237 | 237 | let(:env) { { 'SKIP' => 'all' } }
|
238 | 238 |
|
239 | 239 | it 'sets the skip option of the ALL section to true' do
|
240 |
| - subject.for_hook('ALL', 'PreCommit')['skip'].should be_true |
| 240 | + subject.for_hook('ALL', 'PreCommit')['skip'].should == true |
241 | 241 | end
|
242 | 242 |
|
243 | 243 | context 'and "all" is capitalized' do
|
244 | 244 | let(:env) { { 'SKIP' => 'ALL' } }
|
245 | 245 |
|
246 | 246 | it 'sets the skip option of the special ALL config to true' do
|
247 |
| - subject.for_hook('ALL', 'PreCommit')['skip'].should be_true |
| 247 | + subject.for_hook('ALL', 'PreCommit')['skip'].should == true |
248 | 248 | end
|
249 | 249 | end
|
250 | 250 | end
|
|
0 commit comments