Skip to content

Commit

Permalink
move shared Range#cover? specs for subranges to own group
Browse files Browse the repository at this point in the history
PR #797 introduces specs for `:===` to behave like `:cover?`, except for subranges.
In order to reuse the `describe :range_cover, shared: true` group for `:===`, it's been suggested to move specs related to subranges to its own group.
  • Loading branch information
lxxxvi authored and eregon committed Oct 20, 2020
1 parent 3b0d822 commit 947c8bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/range/cover_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
describe "Range#cover?" do
it_behaves_like :range_cover_and_include, :cover?
it_behaves_like :range_cover, :cover?
it_behaves_like :range_cover_subrange, :cover?
end
2 changes: 2 additions & 0 deletions core/range/shared/cover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@
end
end
end
end

describe :range_cover_subrange, shared: true do
ruby_version_is "2.6" do
context "range argument" do
it "accepts range argument" do
Expand Down

0 comments on commit 947c8bb

Please sign in to comment.