|
43 | 43 | before { vim.feedkeys 'itest(\<CR>' }
|
44 | 44 |
|
45 | 45 | it "indents by one level" do
|
46 |
| - proposed_indent.should == shiftwidth |
| 46 | + proposed_indent.should satisfy { |v| v == shiftwidth * 2 or v == 4 } |
47 | 47 | vim.feedkeys 'something'
|
48 |
| - indent.should == shiftwidth |
| 48 | + indent.should == 4 |
49 | 49 | vim.normal '=='
|
50 |
| - indent.should == shiftwidth |
| 50 | + indent.should == 4 |
51 | 51 | end
|
52 | 52 |
|
53 | 53 | it "puts the closing parenthesis at the same level" do
|
|
80 | 80 | before { vim.feedkeys 'imydict = { # comment\<CR>' }
|
81 | 81 |
|
82 | 82 | it "indent by one level" do
|
83 |
| - indent.should == shiftwidth |
| 83 | + indent.should == 4 |
84 | 84 | vim.feedkeys '1: 1,\<CR>'
|
85 |
| - indent.should == shiftwidth |
| 85 | + indent.should == 4 |
86 | 86 | end
|
87 | 87 |
|
88 | 88 | it "lines up the closing parenthesis" do
|
|
102 | 102 | describe "when after multiple parens of different types" do
|
103 | 103 | it "indents by one level" do
|
104 | 104 | vim.feedkeys 'if({\<CR>'
|
105 |
| - indent.should == shiftwidth |
| 105 | + indent.should == 4 |
106 | 106 | end
|
107 | 107 |
|
108 | 108 | it "lines up with the last paren" do
|
|
171 | 171 | describe "when using a function definition" do
|
172 | 172 | it "indents shiftwidth spaces" do
|
173 | 173 | vim.feedkeys 'idef long_function_name(\<CR>arg'
|
174 |
| - indent.should == shiftwidth * 2 |
| 174 | + indent.should satisfy { |v| v == shiftwidth * 2 or v == 4 } |
175 | 175 | end
|
176 | 176 | end
|
177 | 177 |
|
178 | 178 | describe "when using a class definition" do
|
179 | 179 | it "indents shiftwidth spaces" do
|
180 | 180 | vim.feedkeys 'iclass Foo(\<CR>'
|
181 |
| - indent.should == shiftwidth * 2 |
| 181 | + indent.should satisfy { |v| v == shiftwidth * 2 or v == 4 } |
182 | 182 | end
|
183 | 183 | end
|
184 | 184 |
|
|
379 | 379 |
|
380 | 380 | it "ignores the call signature after a function" do
|
381 | 381 | vim.feedkeys 'idef f( JEDI_CALL_SIGNATURE\<CR>'
|
382 |
| - indent.should == shiftwidth * 2 |
| 382 | + indent.should satisfy { |v| v == shiftwidth * 2 or v == 4 } |
383 | 383 | end
|
384 | 384 | end
|
385 | 385 | end
|
|
0 commit comments