Skip to content

Commit ce34b25

Browse files
author
jneen
committed
delete a too-brittle spec in favour of the visual spec
1 parent 1e96e67 commit ce34b25

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

spec/lexers/gherkin_spec.rb

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -44,38 +44,5 @@
4444
assert { tokens[6] == [Token['Name.Variable'], '<baz>'] }
4545
assert { tokens[7] == [Token['Text'], ')< garbage'] }
4646
end
47-
48-
it 'highlights annotated strings correctly' do
49-
source = <<~GHERKIN
50-
Given I have some code
51-
"""ruby
52-
class Calculator
53-
end
54-
"""
55-
GHERKIN
56-
57-
find_calls = []
58-
original_find = Rouge::Lexer.method(:find)
59-
Rouge::Lexer.define_singleton_method(:find) do |lang|
60-
find_calls << lang
61-
original_find.call(lang)
62-
end
63-
64-
tokens = subject.lex(source).to_a
65-
66-
assert { tokens.size == 11 }
67-
assert { tokens[0][0] == Token['Name.Function'] }
68-
assert { tokens[2][0] == Token['Literal.String'] }
69-
assert { tokens[1][0] == Token['Text'] }
70-
assert { tokens[3][0] == Token['Keyword'] }
71-
assert { tokens[4][0] == Token['Text'] }
72-
assert { tokens[5][0] == Token['Name.Class'] }
73-
assert { tokens[6][0] == Token['Text'] }
74-
assert { tokens[7][0] == Token['Keyword'] }
75-
assert { tokens[8][0] == Token['Text'] }
76-
assert { tokens[9][0] == Token['Literal.String'] }
77-
assert { tokens[10][0] == Token['Text'] }
78-
assert { find_calls.include?('ruby') }
79-
end
8047
end
8148
end

0 commit comments

Comments
 (0)