Sha256: 9a954e1a4313209b1d38375024b7371799416e4eda506e4c97b285a6eed20bc1

Contents?: true

Size: 403 Bytes

Versions: 48

Compression:

Stored size: 403 Bytes

Contents

describe "Kernel#p" do
  before { extend OutputSilencer }

  it "returns nil if called with no arguments" do
    silence_stdout { p.should == nil }
  end

  it "returns its argument if called with one argument" do
    silence_stdout { p(123).should == 123 }
  end

  it "returns all arguments as an Array if called with multiple arguments" do
    silence_stdout { p(1,2,3).should == [1,2,3] }
  end
end

Version data entries

48 entries across 48 versions & 3 rubygems

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