当我测试失败时,我会从稍微不同的目录路径中获得重复错误。例如:
1) Bike when created should not be broken
Failure/Error: it { is_expected.not_to be_broken }
expected #<Bike:0x007fb5c7061448> to respond to `broken?`
# /Users/paulwallis/Projects/sudo_boris_bikes/spec/bike_spec.rb:4:in `block (3 levels) in <top (required)>'
4) Bike when created should not be broken
Failure/Error: it { is_expected.not_to be_broken }
expected #<Bike:0x007fb5c70f26a0> to respond to `broken?`
# ./spec/bike_spec.rb:4:in `block (3 levels) in <top (required)>'
它们是相同的错误,但仅使用目录路径的一部分。它们是重复的吗?