Sha256: 1bb5d410fb8da176b5a3018de708acd73e05d3440363cf96e2234bc90385b928
Contents?: true
Size: 572 Bytes
Versions: 2
Compression:
Stored size: 572 Bytes
Contents
module Whenner describe '#Promise' do it 'returns a promise itself' do promise = Whenner::Deferred.new.promise expect(Whenner::Conversions.Promise(promise)).to be(promise) end it 'returns a promise for a deferred' do deferred = Whenner::Deferred.new expect(Whenner::Conversions.Promise(deferred)).to be(deferred.promise) end it 'returns a resolved promise for an object' do promise = Whenner::Conversions.Promise('foo') expect(promise.value).to eql('foo') expect(promise).to be_fulfilled end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
whenner-0.2.0 | spec/whenner/conversions_spec.rb |
whenner-0.1.1 | spec/whenner/conversions_spec.rb |