Skip to content

Commit

Permalink
Update expected log in the specs
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Mar 29, 2016
1 parent cb6f77f commit 1289aa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/concerns/dry_runnable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def counts
[@agent.memory, counts]
}

expect(results[:log]).to match(/\AE, .+ ERROR -- : Exception during dry-run. SandboxedAgent does not support dry-run: /)
expect(results[:log]).to match(/\A\[\d\d:\d\d:\d\d\] INFO -- : Dry Run failed\n\[\d\d:\d\d:\d\d\] ERROR -- : Exception during dry-run. SandboxedAgent does not support dry-run: /)
expect(results[:events]).to eq([])
expect(results[:memory]).to eq({})
end
Expand All @@ -86,7 +86,7 @@ def counts
[@agent.memory, counts]
}

expect(results[:log]).to match(/\AI, .+ INFO -- : Logging\nE, .+ ERROR -- : Recording error\n/)
expect(results[:log]).to match(/\A\[\d\d:\d\d:\d\d\] INFO -- : Dry Run started\n\[\d\d:\d\d:\d\d\] INFO -- : Logging\n\[\d\d:\d\d:\d\d\] ERROR -- : Recording error\n/)
expect(results[:events]).to eq([{ 'test' => 'foo' }, { 'test' => 'bar' }])
expect(results[:memory]).to eq({ 'last_status' => 'ok', 'dry_run' => true })
end
Expand All @@ -101,7 +101,7 @@ def counts
[@agent.memory, counts]
}

expect(results[:log]).to match(/\AI, .+ INFO -- : Logging\nE, .+ ERROR -- : Recording error\n/)
expect(results[:log]).to match(/\A\[\d\d:\d\d:\d\d\] INFO -- : Dry Run started\n\[\d\d:\d\d:\d\d\] INFO -- : Logging\n\[\d\d:\d\d:\d\d\] ERROR -- : Recording error\n/)
expect(results[:events]).to eq([{ 'test' => 'superfoo' }, { 'test' => 'superbar' }])
expect(results[:memory]).to eq({ 'last_status' => 'ok', 'dry_run' => true })
end
Expand Down

0 comments on commit 1289aa6

Please sign in to comment.