Sha256: 9d79f042bcb2e30e51a3594383289505523533cb5a7eed89944a2de3a557ed93

Contents?: true

Size: 882 Bytes

Versions: 160

Compression:

Stored size: 882 Bytes

Contents

require 'spec_helper'
require 'gherkin/formatter/model'
require 'gherkin/formatter/argument'

module Gherkin
  module Formatter
    module Model
      describe Tag do
        it "should be equal when name is equal" do
          tags = [Tag.new('@x', 1), Tag.new('@y', 2), Tag.new('@x', 3)]
          tags.to_a.uniq.length.should == 2
        end
      end

      describe Step do
        it "should provide arguments for outline tokens" do
          step = Step.new([], 'Given ', "I have <number> cukes in <whose> belly", 10)
          step.outline_args.map{|arg| [arg.offset, arg.val]}.should == [[7, "<number>"], [25, "<whose>"]]
        end

        it "should provide no arguments when there are no outline tokens" do
          step = Step.new([], 'Given ', "I have 33 cukes in my belly", 10)
          step.outline_args.to_a.should == []
        end
      end
    end
  end
end

Version data entries

160 entries across 160 versions & 3 rubygems

Version Path
gherkin-2.4.6-x86-mingw32 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.6-universal-dotnet spec/gherkin/formatter/model_spec.rb
gherkin-2.4.6-java spec/gherkin/formatter/model_spec.rb
gherkin-2.4.5 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.5-x86-mswin32 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.5-x86-mingw32 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.5-universal-dotnet spec/gherkin/formatter/model_spec.rb
gherkin-2.4.5-java spec/gherkin/formatter/model_spec.rb
gherkin-2.4.4-x86-mswin32 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.4-x86-mingw32 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.4-universal-dotnet spec/gherkin/formatter/model_spec.rb
gherkin-2.4.4-java spec/gherkin/formatter/model_spec.rb
gherkin-2.4.3 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.3-x86-mswin32 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.3-x86-mingw32 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.3-universal-dotnet spec/gherkin/formatter/model_spec.rb
gherkin-2.4.3-java spec/gherkin/formatter/model_spec.rb
gherkin-2.4.2 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.2-x86-mswin32 spec/gherkin/formatter/model_spec.rb
gherkin-2.4.2-x86-mingw32 spec/gherkin/formatter/model_spec.rb