Sha256: dfe17b969063ee19a02d7e0ec6f66893db6887cb3483a10dcf285cc858e5eff1

Contents?: true

Size: 750 Bytes

Versions: 6911

Compression:

Stored size: 750 Bytes

Contents

require 'spec_helper'

describe Typhoeus::Hydra::Addable do
  let(:hydra) { Typhoeus::Hydra.new() }
  let(:request) { Typhoeus::Request.new("localhost:3001", {:method => :get}) }

  it "asks easy factory for an easy" do
    multi = double
    expect(Typhoeus::EasyFactory).to receive(:new).with(request, hydra).and_return(double(:get => 1))
    expect(hydra).to receive(:multi).and_return(multi)
    expect(multi).to receive(:add).with(1)
    hydra.add(request)
  end

  it "adds easy to multi" do
    multi = double
    expect(Typhoeus::EasyFactory).to receive(:new).with(request, hydra).and_return(double(:get => 1))
    expect(hydra).to receive(:multi).and_return(multi)
    expect(multi).to receive(:add).with(1)
    hydra.add(request)
  end
end

Version data entries

6,911 entries across 6,908 versions & 28 rubygems

Version Path
ory-client-0.0.1.alpha37 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha36 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-kratos-client-0.8.2.alpha1 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha31 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha30 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha29 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha28 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha27 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha24 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha23 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-kratos-client-0.8.0.alpha2 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-client-0.0.1.alpha21 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-keto-client-0.7.0.alpha1 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-keto-client-0.7.0.alpha0 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-kratos-client-0.7.6.alpha7 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-kratos-client-0.7.6.alpha6 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-kratos-client-0.7.6.alpha5 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-kratos-client-0.7.6.alpha4 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-kratos-client-0.7.6.alpha3 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb
ory-kratos-client-0.7.6.alpha1 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.4.0/spec/typhoeus/hydra/addable_spec.rb