1
0
Fork 0
mirror of synced 2024-05-24 11:10:31 -04:00
ultimate-vim/sources_non_forked/vim-elixir/spec/indent/embedded_elixir_spec.rb
2022-05-19 01:31:41 +08:00

32 lines
626 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe 'Indenting eelixir' do
it 'anonymous function' do
expect(<<~EOF).to be_eelixir_indentation
<%= form_for @changeset, user_path(@conn, :create), fn f -> %>
It is obviously true
<% end %>
EOF
end
it 'if..do..end' do
expect(<<~EOF).to be_eelixir_indentation
<%= if true do %>
It is obviously true
<% end %>
EOF
end
it 'if..do..else..end' do
expect(<<~EOF).to be_eelixir_indentation
<%= if true do %>
It is obviously true
<% else %>
This will never appear
<% end %>
EOF
end
end