X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/446bfd0cb17b5ea5b13161440a61d1a5f057c703..a946371787067299e53338857b792005b84d8962:/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:'