Sha256: e1d9f0bad579fe1608210c17f06020fdf8e8c480d8541f6fde8d66586fefcafe

Contents?: true

Size: 902 Bytes

Versions: 168

Compression:

Stored size: 902 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, nil, nil)
          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, nil, nil)
          step.outline_args.to_a.should == []
        end
      end
    end
  end
end

Version data entries

168 entries across 163 versions & 9 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/gherkin-2.12.2/spec/gherkin/formatter/model_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/gherkin-2.12.2/spec/gherkin/formatter/model_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/gherkin-2.12.2/spec/gherkin/formatter/model_spec.rb
gherkin-2.12.2 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.2-x86-mswin32 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.2-x86-mingw32 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.2-java spec/gherkin/formatter/model_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/gherkin-2.11.1/spec/gherkin/formatter/model_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/gherkin-2.11.1/spec/gherkin/formatter/model_spec.rb
candlepin-api-0.4.0 bundle/ruby/gems/gherkin-2.11.1/spec/gherkin/formatter/model_spec.rb
gherkin-2.12.1 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.1-x86-mswin32 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.1-x86-mingw32 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.1-java spec/gherkin/formatter/model_spec.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/gherkin-2.11.6/spec/gherkin/formatter/model_spec.rb
gherkin-2.12.0 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.0-x86-mingw32 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.0-x86-mswin32 spec/gherkin/formatter/model_spec.rb
gherkin-2.12.0-java spec/gherkin/formatter/model_spec.rb
gherkin-2.11.8 spec/gherkin/formatter/model_spec.rb