Skip to content

Commit

Permalink
move test for Enumerator::Lazy#compact to compact_spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
sampatbadhe authored and eregon committed Oct 8, 2022
1 parent 8a061ff commit eeb9914
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 11 additions & 0 deletions core/enumerator/lazy/compact_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require_relative '../../../spec_helper'

ruby_version_is '3.1' do
describe "Enumerator::Lazy#compact" do
it 'returns array without nil elements' do
arr = [1, nil, 3, false, 5].to_enum.lazy.compact
arr.should be_an_instance_of(Enumerator::Lazy)
arr.force.should == [1, 3, false, 5]
end
end
end
10 changes: 0 additions & 10 deletions core/enumerator/lazy/lazy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,3 @@
lazy.lazy.should equal(lazy)
end
end

ruby_version_is '3.1' do
describe "Enumerator::Lazy#compact" do
it 'returns array without nil elements' do
arr = [1, nil, 3, false, 5].to_enum.lazy.compact
arr.should be_an_instance_of(Enumerator::Lazy)
arr.force.should == [1, 3, false, 5]
end
end
end

0 comments on commit eeb9914

Please sign in to comment.