Skip to content

Commit

Permalink
Add spec for variable_not_enclosed where multiple variables are delim…
Browse files Browse the repository at this point in the history
…ited by a dash
  • Loading branch information
rodjek committed Dec 3, 2016
1 parent 2d048d4 commit d187e1a
Showing 1 changed file with 17 additions and 0 deletions.
Expand Up @@ -69,5 +69,22 @@
expect(manifest).to eq(("'groovy'\n" * 20) + '" ${gronk}"')
end
end

context 'variables not enclosed in {}, delimited by -' do
let(:code) { '"$foo-$bar"' }

it 'should only detect two problems' do
expect(problems).to have(2).problems
end

it 'should fix the manifest' do
expect(problems).to contain_fixed(msg).on_line(1).in_column(2)
expect(problems).to contain_fixed(msg).on_line(1).in_column(7)
end

it 'should enclose both variables in braces' do
expect(manifest).to eq('"${foo}-${bar}"')
end
end
end
end

0 comments on commit d187e1a

Please sign in to comment.