Sha256: fa0d5c5abbc5db07f9ab9c42d0d92f865d3d49aabda6ecd4d4f5ffd76818fcac

Contents?: true

Size: 849 Bytes

Versions: 18

Compression:

Stored size: 849 Bytes

Contents

require "rails_helper"
require "serverengine"
require "sneakers"
require "sneakers/runner"
require "external_sneaker"

describe TestWorker, "This is manual labor as we can't verify that sneakers is running", :skip do
  include FileHelper
  let(:message) do
    {
      title: "Cool",
      body: "Hot",
    }
  end
  let(:logger) { Sapience[described_class] }

  before do
    @sneakers_worker = ExternalSneaker.new("rake sneakers:run")
    @sneakers_worker.start

    Sneakers.publish(
      message.to_json,
      to_queue: described_class::QUEUE_NAME,
      routing_key: described_class::ROUTING_KEY,
    )
  end

  after do
    delete_file("config/sapience.yml")
    delete_file(described_class::VERIFICATION_FILE)
  end

  it "runs properly" do
    wait(30.seconds).for { File.exist?(described_class::VERIFICATION_FILE) }.to eq(true)
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sapience-1.0.3 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-1.0.2 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-1.0.1 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-1.0.0 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.18 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.17 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.16 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.15 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.14 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.13 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.12 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.11 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.10 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.9 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.8 test_apps/rails/spec/workers/test_worker_spec.rb
sapience-0.2.7 test_app/spec/workers/test_worker_spec.rb
sapience-0.2.6 test_app/spec/workers/test_worker_spec.rb
sapience-0.2.5 test_app/spec/workers/test_worker_spec.rb