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.4.4 spec/rubyspec/core/kernel/tap_spec.rb
opal-0.4.3 spec/rubyspec/core/kernel/tap_spec.rb
opal-0.4.2 spec/rubyspec/core/kernel/tap_spec.rb
opal-0.4.1 spec/rubyspec/core/kernel/tap_spec.rb
opal-0.4.0 spec/rubyspec/core/kernel/tap_spec.rb
opal-0.3.44 spec/rubyspec/core/kernel/tap_spec.rb
opal-0.3.43 spec/rubyspec/core/kernel/tap_spec.rb
opal-0.3.42 spec/core/kernel/tap_spec.rb
opal-0.3.41 spec/core/kernel/tap_spec.rb
opal-0.3.40 spec/core/kernel/tap_spec.rb
opal-0.3.39 spec/core/kernel/tap_spec.rb
opal-0.3.38 spec/core/kernel/tap_spec.rb
opal-0.3.37 spec/core/kernel/tap_spec.rb
opal-0.3.36 spec/core/kernel/tap_spec.rb
opal-0.3.35 spec/core/kernel/tap_spec.rb
opal-0.3.34 spec/core/kernel/tap_spec.rb
opal-0.3.33 spec/core/kernel/tap_spec.rb
opal-0.3.32 spec/core/kernel/tap_spec.rb
opal-0.3.31 spec/core/kernel/tap_spec.rb
opal-0.3.30 spec/core/kernel/tap_spec.rb