1
0
Fork 0
mirror of synced 2024-11-12 20:28:58 -05:00
ultimate-vim/sources_non_forked/vim-ruby/spec/indent/splat_spec.rb
Maksim Pecherskiy 2deb035254 Cleaning deps.
2014-08-07 19:42:41 -04:00

46 lines
740 B
Ruby

require 'spec_helper'
describe "Indenting" do
specify "splats with blocks in square brackets" do
assert_correct_indenting <<-EOF
x = Foo[*
y do
z
end
]
EOF
assert_correct_indenting <<-EOF
x = Foo[* # with a comment
y do
z
end
]
EOF
end
specify "splats with blocks in assignment" do
assert_correct_indenting <<-EOF
x = *
array.map do
3
end
EOF
end
specify "splats with blocks in round brackets" do
assert_correct_indenting <<-EOF
x = Foo(*y do
z
end)
EOF
assert_correct_indenting <<-EOF
x = Foo(
*y do
z
end
)
EOF
end
end