Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou13 committed Jun 21, 2017
1 parent 8e816d7 commit 33b8689
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/indent/indent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
before { vim.feedkeys 'itest(\<CR>' }

it "indents by one level" do
proposed_indent.should == shiftwidth
proposed_indent.should satisfy { |v| v == shiftwidth * 2 or v == 4 }
vim.feedkeys 'something'
indent.should == shiftwidth
indent.should == 4
vim.normal '=='
indent.should == shiftwidth
indent.should == 4
end

it "puts the closing parenthesis at the same level" do
Expand Down Expand Up @@ -80,9 +80,9 @@
before { vim.feedkeys 'imydict = { # comment\<CR>' }

it "indent by one level" do
indent.should == shiftwidth
indent.should == 4
vim.feedkeys '1: 1,\<CR>'
indent.should == shiftwidth
indent.should == 4
end

it "lines up the closing parenthesis" do
Expand All @@ -102,7 +102,7 @@
describe "when after multiple parens of different types" do
it "indents by one level" do
vim.feedkeys 'if({\<CR>'
indent.should == shiftwidth
indent.should == 4
end

it "lines up with the last paren" do
Expand Down Expand Up @@ -171,14 +171,14 @@
describe "when using a function definition" do
it "indents shiftwidth spaces" do
vim.feedkeys 'idef long_function_name(\<CR>arg'
indent.should == shiftwidth * 2
indent.should satisfy { |v| v == shiftwidth * 2 or v == 4 }
end
end

describe "when using a class definition" do
it "indents shiftwidth spaces" do
vim.feedkeys 'iclass Foo(\<CR>'
indent.should == shiftwidth * 2
indent.should satisfy { |v| v == shiftwidth * 2 or v == 4 }
end
end

Expand Down Expand Up @@ -379,7 +379,7 @@

it "ignores the call signature after a function" do
vim.feedkeys 'idef f( JEDI_CALL_SIGNATURE\<CR>'
indent.should == shiftwidth * 2
indent.should satisfy { |v| v == shiftwidth * 2 or v == 4 }
end
end
end
Expand Down

0 comments on commit 33b8689

Please sign in to comment.