Skip to content

Commit 88bc03e

Browse files
committed
Remove deprecation notice from usage formatter which uses step key class
1 parent 0842a36 commit 88bc03e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

lib/cucumber/formatter/usage.rb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,22 @@ module Cucumber
88
module Formatter
99
class Usage < Progress
1010
include Console
11-
class StepDefKey < StepDefinitionLight
11+
class StepDefKey
1212
attr_accessor :mean_duration, :status
13+
attr_reader :regexp_source, :location
14+
15+
def initialize(regexp_source, location)
16+
@regexp_source = regexp_source
17+
@location = location
18+
end
19+
20+
def eql?(other)
21+
regexp_source == other.regexp_source && location == other.location
22+
end
23+
24+
def hash
25+
regexp_source.hash + 31 * location.to_s.hash
26+
end
1327
end
1428

1529
def initialize(config)

0 commit comments

Comments
 (0)