aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/ruby_spec.lua
blob: 1653aaa8782b0fa1585ec33dab118fa99a1fc9f8 (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 = {},
    })
  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)