Sha256: de3f4ef0ff52b54b96d17c6ddae43aac62118d005e3df7e8b29611a1f1d1c1af

Contents?: true

Size: 751 Bytes

Versions: 30

Compression:

Stored size: 751 Bytes

Contents

#encoding: utf-8
require 'spec_helper'

module Gherkin
  describe I18nLexer do
    before do
      @lexer = Gherkin::I18nLexer.new(Gherkin::SexpRecorder.new, false)
    end

    it "should store the i18n language of the last scanned feature" do
      @lexer.scan("# language: fr\n")
      @lexer.i18n_language.iso_code.should == "fr"
      @lexer.scan("# language: no\n")
      @lexer.i18n_language.iso_code.should == "no"
    end

    it "should use English i18n by default" do
      @lexer.scan("Feature: foo\n")
      @lexer.i18n_language.iso_code.should == "en"
    end

    it "should === its ruby class, even when the impl is Java" do
      Gherkin::I18nLexer.should === Gherkin::I18nLexer.new(Gherkin::SexpRecorder.new, true)
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
gherkin-2.1.5 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.5-i386-mswin32 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.5-i386-mingw32 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.5-universal-dotnet spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.5-java spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.4 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.4-i386-mswin32 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.4-i386-mingw32 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.4-universal-dotnet spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.4-java spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.3 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.3-i386-mswin32 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.3-i386-mingw32 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.3-universal-dotnet spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.3-java spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.2 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.2-i386-mswin32 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.2-i386-mingw32 spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.2-universal-dotnet spec/gherkin/i18n_lexer_spec.rb
gherkin-2.1.2-java spec/gherkin/i18n_lexer_spec.rb