Sha256: 757a6f61b793428faa022dafcb973f7e2e9e5c084cfd2c1dde17decce644a1d0
Contents?: true
Size: 606 Bytes
Versions: 23
Compression:
Stored size: 606 Bytes
Contents
require 'spec_helper' describe Dragonfly::Job::Fetch do let (:app) { test_app } let (:job) { Dragonfly::Job.new(app) } before(:each) do job.fetch!('some_uid') end it { job.steps.should match_steps([Dragonfly::Job::Fetch]) } it "should read from the app's datastore when applied" do app.datastore.should_receive(:read).with('some_uid').and_return ["", {}] job.apply end it "raises NotFound if the datastore returns nil" do app.datastore.should_receive(:read).and_return(nil) expect { job.apply }.to raise_error(Dragonfly::Job::Fetch::NotFound) end end
Version data entries
23 entries across 23 versions & 1 rubygems