1
require "cucumber/filters/tag_limits"
3
describe Cucumber::Filters::TagLimits::TestCaseIndex do
4
subject(:index) { Cucumber::Filters::TagLimits::TestCaseIndex.new }
8
double(:test_case, tags: [tag_one], location: a_location_of_tag_one),
9
double(:test_case, tags: [tag_one, tag_two], location: a_location_of_tag_one_and_tag_two)
13
let(:tag_one) { double(:tag_one, name: "@one") }
14
let(:tag_two) { double(:tag_two, name: "@two") }
16
let(:a_location_of_tag_one) { double(:a_location_of_tag_one) }
17
let(:a_location_of_tag_one_and_tag_two) { double(:a_location_of_tag_one_and_tag_two) }
20
test_cases.map do |test_case|
25
describe "#count_by_tag_name" do
26
it "returns the number of test cases with the tag" do
27
expect(index.count_by_tag_name("@one")).to eq(2)
28
expect(index.count_by_tag_name("@two")).to eq(1)
32
describe "#locations_by_tag_name" do
33
it "returns the locations of test cases with the tag" do
34
expect(index.locations_of_tag_name("@one")).to eq([a_location_of_tag_one, a_location_of_tag_one_and_tag_two])
35
expect(index.locations_of_tag_name("@two")).to eq([a_location_of_tag_one_and_tag_two])