Sha256: 7c5f44558f8c47ae1fde717f681e2247a5945dd0a4b44d92872acbf76dcd8333

Contents?: true

Size: 270 Bytes

Versions: 29

Compression:

Stored size: 270 Bytes

Contents

describe "Kernel#tap" do
  it "always yields self and returns self" do
    a = Object.new
    a.tap {|o| o.should equal(a); 42}.should equal(a)
  end

  it "raises a LocalJumpError when no block given" do
    lambda { 3.tap }.should raise_error(LocalJumpError)
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
opal-0.3.29 spec/core/kernel/tap_spec.rb
opal-0.3.28 spec/core/kernel/tap_spec.rb
opal-0.3.27 spec/core/kernel/tap_spec.rb
opal-0.3.26 spec/core/kernel/tap_spec.rb
opal-0.3.25 spec/core/kernel/tap_spec.rb
opal-0.3.22 spec/core/kernel/tap_spec.rb
opal-0.3.21 test/core/kernel/tap_spec.rb
opal-0.3.20 test/core/kernel/tap_spec.rb
opal-0.3.19 test/core/kernel/tap_spec.rb