Sha256: 3cc6c9ee3af1f4da4799388ed1d7afd024eafda9ce08a4a3597a64b192d99b2c

Contents?: true

Size: 1.25 KB

Versions: 14

Compression:

Stored size: 1.25 KB

Contents

require File.join(File.dirname(__FILE__), "..", "spec_helper")
require 'fileutils'

module Wally
  describe CountsTags do
    it "counts feature tags" do
      create_feature("project1", "feature-1.feature", "@tag1 @tag2\nFeature: Feature 1")
      create_feature("project1", "feature-2.feature", "@tag2 @tag2\nFeature: Feature 2")
      CountsTags.new(project("project1")).count_tags.should == {
        "@tag1" => 1,
        "@tag2" => 3
      }
    end

    it "counts scenario tags" do
      create_feature("project1", "feature-1.feature", "Feature: Feature 1\n@tag1@tag1\nScenario: Scenario 1")
      create_feature("project1", "feature-2.feature", "Feature: Feature 2\n@tag3@tag1\nScenario: Scenario 1")
      CountsTags.new(project("project1")).count_tags.should == {
        "@tag1" => 3,
        "@tag3" => 1
      }
    end

    it "counts feature tags irrespective of their case" do
      create_feature("project1", "feature-1.feature", "@tag1\nFeature: Feature 1")
      create_feature("project1", "feature-2.feature", "@TAG1\nFeature: Feature 2")
      create_feature("project1", "feature-3.feature", "Feature: Feature 2\n@TAG1\nScenario: Scenario 1")
      CountsTags.new(project("project1")).count_tags.should == {
        "@tag1" => 3
      }
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wally-0.0.47 spec/wally/counts_tags_spec.rb
wally-0.0.46 spec/wally/counts_tags_spec.rb
wally-0.0.45 spec/wally/counts_tags_spec.rb
wally-0.0.44 spec/wally/counts_tags_spec.rb
wally-0.0.43 spec/wally/counts_tags_spec.rb
wally-0.0.42 spec/wally/counts_tags_spec.rb
wally-0.0.41 spec/wally/counts_tags_spec.rb
wally-0.0.40 spec/wally/counts_tags_spec.rb
wally-0.0.39 spec/wally/counts_tags_spec.rb
wally-0.0.38 spec/wally/counts_tags_spec.rb
wally-0.0.37 spec/wally/counts_tags_spec.rb
wally-0.0.36 spec/wally/counts_tags_spec.rb
wally-0.0.35 spec/wally/counts_tags_spec.rb
wally-0.0.34 spec/wally/counts_tags_spec.rb