Sha256: 9253fe233f153146a18fd6e2e1e62f8de3690b1301a1c681dc8ce3e20932a81a

Contents?: true

Size: 586 Bytes

Versions: 4

Compression:

Stored size: 586 Bytes

Contents

#encoding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

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

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gherkin-1.0.3-i386-mswin32 spec/gherkin/i18n_lexer_spec.rb
gherkin-1.0.3-i386-mingw32 spec/gherkin/i18n_lexer_spec.rb
gherkin-1.0.3-java spec/gherkin/i18n_lexer_spec.rb
gherkin-1.0.3 spec/gherkin/i18n_lexer_spec.rb