aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/ruby_spec.lua
blob: 277d02bf0ba481b50a343672c0f0d32390cb4db1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local Runner = require("tests.indent.common").Runner

local run = Runner:new(it, "tests/indent/ruby", {
  shiftwidth = 2,
  expandtab = true,
})

describe("indent Ruby:", function()
  describe("whole file:", function()
    run:whole_file(".", {
      expected_failures = { "./period-issue-3364.rb" },
    })
  end)

  describe("new line:", function()
    run:new_line("indent-unless.rb", { on_line = 1, text = "stmt", indent = 2 })
    run:new_line("indent-assignment.rb", { on_line = 1, text = "1 +", indent = 2 })
    run:new_line("indent-parenthesized-statements.rb", { on_line = 1, text = "stmt", indent = 2 })
  end)
end)