require 'rails_helper'

describe Dunlop::LogEntryCreator do
  let(:model) { ExecutionBatch::MyBatch }

  it "creates log entries inside a long running process" do
    record = model.execute!
    record.log_entries.pluck(:body).should eq [
      "transition to processing",
      "INFO - Actual info in long running process",
      "transition to completed",
      "- execute_process:\n  - INFO - Finished 30 imaginary tasks\n"
    ]
  end

end
