mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
21 lines
596 B
Crystal
21 lines
596 B
Crystal
require "./spec_helper"
|
|
|
|
describe Spectator::LineExampleFilter do
|
|
describe "#includes?" do
|
|
context "with a matching example" do
|
|
it "is true" do
|
|
example = PassingExample.create
|
|
filter = Spectator::LineExampleFilter.new(example.source.line)
|
|
filter.includes?(example).should be_true
|
|
end
|
|
end
|
|
|
|
context "with a non-matching example" do
|
|
it "is false" do
|
|
example = PassingExample.create
|
|
filter = Spectator::LineExampleFilter.new(example.source.line + 5)
|
|
filter.includes?(example).should be_false
|
|
end
|
|
end
|
|
end
|
|
end
|