Sha256: efb56e6fc5053db64289fd1c1e679700853acdc9d00a987bca2b18a694aaad38

Contents?: true

Size: 413 Bytes

Versions: 17

Compression:

Stored size: 413 Bytes

Contents

describe "Enumerable#drop_while" do
  before :each do
    @enum = EnumerableSpecs::Numerous.new(3, 2, 1, :go)
  end

  it "returns no/all elements for {true/false} block" do
    @enum.drop_while {true}.should == []
    @enum.drop_while {false}.should == @enum.to_a
  end

  it "accepts returns other than true/false" do
    @enum.drop_while{1}.should == []
    @enum.drop_while{nil}.should == @enum.to_a
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
opal-0.3.41 spec/core/enumerable/drop_while_spec.rb
opal-0.3.40 spec/core/enumerable/drop_while_spec.rb
opal-0.3.39 spec/core/enumerable/drop_while_spec.rb
opal-0.3.38 spec/core/enumerable/drop_while_spec.rb
opal-0.3.37 spec/core/enumerable/drop_while_spec.rb
opal-0.3.36 spec/core/enumerable/drop_while_spec.rb
opal-0.3.35 spec/core/enumerable/drop_while_spec.rb
opal-0.3.34 spec/core/enumerable/drop_while_spec.rb
opal-0.3.33 spec/core/enumerable/drop_while_spec.rb
opal-0.3.32 spec/core/enumerable/drop_while_spec.rb
opal-0.3.31 spec/core/enumerable/drop_while_spec.rb
opal-0.3.30 spec/core/enumerable/drop_while_spec.rb
opal-0.3.29 spec/core/enumerable/drop_while_spec.rb
opal-0.3.28 spec/core/enumerable/drop_while_spec.rb
opal-0.3.27 spec/core/enumerable/drop_while_spec.rb
opal-0.3.26 spec/core/enumerable/drop_while_spec.rb
opal-0.3.25 spec/core/enumerable/drop_while_spec.rb