X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/18593f1150972346884dac64d7e71fd6a5f2b0fc..502aea33111e33371315b4b5e93f4ba3452dbf80:/spec/indent/indent_spec.rb diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 38ce192..bd0d0d9 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -1,6 +1,6 @@ require "spec_helper" -describe "vim" do +shared_examples_for "vim" do before(:each) { vim.normal 'gg"_dG' } # clear buffer @@ -86,7 +86,7 @@ describe "vim" do end it "indents relative to line above" do - vim.feedkeys 'i\tvalue = test + \\\\\' + vim.feedkeys 'i\value = test + \\\\\' indent.should == shiftwidth * 2 end end @@ -131,3 +131,18 @@ describe "vim" do end end +describe "vim when using width of 4" do + before { + vim.command("set sw=4 ts=4 sts=4 et") + } + + it_behaves_like "vim" +end + +describe "vim when using width of 8" do + before { + vim.command("set sw=8 ts=8 sts=8 et") + } + + it_behaves_like "vim" +end