Permalink
Browse files

Small tweak to work around new ISO-8859-1 file in cucumber

  • Loading branch information...
1 parent f4b937d commit 60b263b135c691308fbe96ab95f4db9701365e12 @aslakhellesoy aslakhellesoy committed Mar 21, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 features/step_definitions/pretty_formatter_steps.rb
  2. +1 −1 lib/gherkin/lexer/i18n_lexer.rb
@@ -59,6 +59,7 @@ def parse(parser, gherkin, feature_path)
@error = false
@feature_paths.each do |feature_path|
begin
+ next if feature_path =~ /iso-8859-1\.feature/
original = pretty_machinery(IO.read(feature_path), feature_path)
via_machinery = self.__send__("#{machinery}_machinery", original, feature_path)
via_machinery.should == original
@@ -32,7 +32,7 @@ def create_delegate(source)
def lang(source)
key = 'en'
- source.split(/\n/).each do |line|
+ source.each_line do |line|
break unless COMMENT_OR_EMPTY_LINE_PATTERN =~ line
if LANGUAGE_PATTERN =~ line
key = $1

0 comments on commit 60b263b

Please sign in to comment.