Skip to content

Commit 67d8bb6

Browse files
committed
spec: fix false positive tests
These tests only worked by accident until spec_helper was changed to match syntax groups exactly.
1 parent dd917fc commit 67d8bb6

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

spec/syntax/sigil_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
end
9898

9999
it 'with escapes' do
100-
expect('~s(foo \n bar)').to include_elixir_syntax('elixirRegexEscape', '\\')
100+
expect('~s(foo \n bar)').to include_elixir_syntax('elixirRegexEscapePunctuation', '\\')
101101
end
102102

103103
it 'with interpolation' do
@@ -113,7 +113,7 @@
113113
end
114114

115115
it 'escapes with slashes' do
116-
expect('~s/foo \n bar/').to include_elixir_syntax('elixirRegexEscape', '\\')
116+
expect('~s/foo \n bar/').to include_elixir_syntax('elixirRegexEscapePunctuation', '\\')
117117
end
118118
end
119119
end

spec/syntax/struct_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
expect(str).to include_elixir_syntax('elixirStruct', 'name:')
3232

3333
expect(str).to include_elixir_syntax('elixirStructDelimiter', '}')
34-
expect(str).to include_elixir_syntax('elixirStruct', '}')
3534
end
3635

3736
it 'properly closes strings in structs' do
@@ -59,7 +58,6 @@
5958
expect(str).to include_elixir_syntax('elixirStruct', '"}')
6059

6160
expect(str).to include_elixir_syntax('elixirStructDelimiter', '} #')
62-
expect(str).to include_elixir_syntax('elixirStruct', '} #')
6361

6462
expect(str).to include_elixir_syntax('elixirComment', '# this should not be a string still')
6563
end

spec/syntax/tuple_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@
1313
expect(str).to include_elixir_syntax('elixirTuple', ':name')
1414

1515
expect(str).to include_elixir_syntax('elixirTupleDelimiter', '}')
16-
expect(str).to include_elixir_syntax('elixirTuple', '}')
1716
end
1817
end

0 commit comments

Comments
 (0)