Sha256: 8ffe8d8f7090098baf5b16833cb3d8113812be78aa3abb02f57aac551be2e693

Contents?: true

Size: 794 Bytes

Versions: 37

Compression:

Stored size: 794 Bytes

Contents

#encoding: utf-8
require 'spec_helper'

module Gherkin
  module Lexer
    begin
      require 'gherkin/lexer/en'
    rescue LoadError
      # For Java/JRuby we might not have the generated ruby lexer, which
      # won't be used anyway. Just define a stub.
      class En
        native_impl('gherkin')
      end 
    end

    describe "Native Lexer" do
      before do
        @listener = Gherkin::SexpRecorder.new
        @lexer = Gherkin::Lexer::En.new(@listener)
      end

      it_should_behave_like "a Gherkin lexer"
      it_should_behave_like "a Gherkin lexer lexing tags"
      it_should_behave_like "a Gherkin lexer lexing doc_strings"
      it_should_behave_like "a Gherkin lexer lexing rows"
      it_should_behave_like "encoding" unless ENV['GHERKIN_JS_NATIVE']
    end
  end
end

Version data entries

37 entries across 35 versions & 3 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/gherkin-2.12.2/spec/gherkin/native_lexer_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/gherkin-2.12.2/spec/gherkin/native_lexer_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/gherkin-2.12.2/spec/gherkin/native_lexer_spec.rb
gherkin-2.12.2 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.2-x86-mswin32 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.2-x86-mingw32 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.2-java spec/gherkin/native_lexer_spec.rb
gherkin-2.12.1 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.1-x86-mswin32 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.1-x86-mingw32 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.1-java spec/gherkin/native_lexer_spec.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/gherkin-2.11.6/spec/gherkin/native_lexer_spec.rb
gherkin-2.12.0 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.0-x86-mingw32 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.0-x86-mswin32 spec/gherkin/native_lexer_spec.rb
gherkin-2.12.0-java spec/gherkin/native_lexer_spec.rb
gherkin-2.11.8 spec/gherkin/native_lexer_spec.rb
gherkin-2.11.8-x86-mswin32 spec/gherkin/native_lexer_spec.rb
gherkin-2.11.8-x86-mingw32 spec/gherkin/native_lexer_spec.rb
gherkin-2.11.8-java spec/gherkin/native_lexer_spec.rb