Sha256: 6b6e0ffbf235a9f6a58770c421ba1f73e5ef5e1a10af8937f3f09a6f72c8db5d

Contents?: true

Size: 460 Bytes

Versions: 4

Compression:

Stored size: 460 Bytes

Contents

require 'stringio'
require 'rest-core/test'

describe RC::Promise::Future do
  should 'fulfill the future' do
    promise = RC::Promise.new(RC::FAIL => [])
    promise.fulfill('body', 200, {'A' => 'B'}, StringIO.new)

    promise.future_body    .should.eq 'body'
    promise.future_status  .should.eq 200
    promise.future_headers .should.eq('A' => 'B')
    promise.future_socket  .should.kind_of(StringIO)
    promise.future_failures.should.eq []
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rest-core-3.2.0 test/test_future.rb
rest-core-3.1.1 test/test_future.rb
rest-core-3.1.0 test/test_future.rb
rest-core-3.0.0 test/test_future.rb