Sha256: 998e04d68cd7473ce7470fb6df08e9f82d428971b4cf83be6b548cf4f6bb02dc

Contents?: true

Size: 326 Bytes

Versions: 2

Compression:

Stored size: 326 Bytes

Contents

require 'spec_helper'
require 'browser/immediate'

describe Proc do
  describe '#defer' do
    it 'defers the parameters' do
      promise = Browser::Promise.new
      proc {|a|
        expect(a).to eq(42)
        promise.resolve
      }.defer(42)
      promise.for_rspec
    end
  end
end if Opal::RSpec::VERSION.to_f >= 1.0

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opal-browser-0.3.5 spec/immediate_spec.rb
opal-browser-0.3.4 spec/immediate_spec.rb