X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/446bfd0cb17b5ea5b13161440a61d1a5f057c703..42bd7b164647f1ff3ba899276664d63b6a882f2e:/spec/indent/indent_spec.rb?ds=inline diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 8ee78a6..cd37f1f 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -198,6 +198,20 @@ shared_examples_for "vim" do end end + describe "when using a function definition" do + it "indents shiftwidth spaces" do + vim.feedkeys 'idef long_function_name(\arg' + indent.should == shiftwidth * 2 + end + end + + describe "when using a class definition" do + it "indents shiftwidth spaces" do + vim.feedkeys 'iclass Foo(\' + indent.should == shiftwidth * 2 + end + end + describe "when writing an 'else' block" do it "aligns to the preceeding 'for' block" do vim.feedkeys 'ifor x in "abc":\pass\else:'