Sha256: 1f5de8845afe1c6c11b90f45da9cc32abe2bbfa25433358c2870666f732e0b09

Contents?: true

Size: 764 Bytes

Versions: 11

Compression:

Stored size: 764 Bytes

Contents

require "spec_helper"

describe SiblingConsumer do
  describe ".perform" do
    it "consumes entry feed" do
      Sibling.should_receive(:consume_main_app_hcard).once
      SiblingConsumer.perform
    end
    it "raises error when there is no Sibling.main_app_uid" do
      lambda { SiblingConsumer.perform }.should raise_error(TypeError)
    end
    it "returns true when there is a Sibling.main_app_uid" do
      Sibling.stub(:main_app_uid).and_return("spec/support/g5-configurator-app.html")
      SiblingConsumer.perform.should be_true
    end
    it "does not swallow errors" do
      Sibling.stub(:consume_main_app_hcard).and_raise(StandardError.new("Foo"))
      lambda { SiblingConsumer.perform }.should raise_error(StandardError, "Foo")
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
g5_sibling_deployer_engine-0.7.0 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.6.3 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.6.2 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.6.1 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.5.0 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.4.2 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.4.1 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.4.0 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.3.3 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.3.2 spec/workers/sibling_consumer_spec.rb
g5_sibling_deployer_engine-0.2.6 spec/workers/sibling_consumer_spec.rb