Sha256: 374527e948bf1d11b60801ccb50a3ed0379889151be2be4598345b9c92aeb518

Contents?: true

Size: 268 Bytes

Versions: 71

Compression:

Stored size: 268 Bytes

Contents

describe "Kernel#Array" do
  it "returns an Array containing the argument if it responds to neither #to_ary nor #to_a" do
    obj = mock('obj')
    Array(obj).should == [obj]
  end

  it "returns an empty Array when passed nil" do
    Array(nil).should == []
  end
end

Version data entries

71 entries across 71 versions & 3 rubygems

Version Path
opal-0.10.6 spec/opal/core/kernel/Array_spec.rb
opal-0.10.6.beta spec/opal/core/kernel/Array_spec.rb
opal-0.10.5 spec/opal/core/kernel/Array_spec.rb
opal-0.10.4 spec/opal/core/kernel/Array_spec.rb
opal-0.11.0.rc1 spec/opal/core/kernel/Array_spec.rb
opal-0.10.3 spec/opal/core/kernel/Array_spec.rb
opal-0.10.2 spec/opal/core/kernel/Array_spec.rb
opal-0.10.1 spec/opal/core/kernel/Array_spec.rb
opal-0.10.0 spec/opal/core/kernel/Array_spec.rb
opal-0.10.0.rc2 spec/opal/core/kernel/Array_spec.rb
opal-0.9.4 spec/opal/core/kernel/Array_spec.rb
opal-0.9.3 spec/opal/core/kernel/Array_spec.rb
opal-0.10.0.rc1 spec/opal/core/kernel/Array_spec.rb
opal-0.10.0.beta5 spec/opal/core/kernel/Array_spec.rb
opal-0.10.0.beta4 spec/opal/core/kernel/Array_spec.rb
opal-0.10.0.beta3 spec/opal/core/kernel/Array_spec.rb
opal-0.10.0.beta2 spec/opal/core/kernel/Array_spec.rb
opal-0.10.0.beta1 spec/opal/core/kernel/Array_spec.rb
opal-0.9.2 spec/opal/core/kernel/Array_spec.rb
opal-0.9.0 spec/opal/core/kernel/Array_spec.rb