Replaces Proc.new usages with proc keyword

This commit is contained in:
Thibault Jouan
2013-08-01 18:33:18 +00:00
parent 57ff1c73be
commit 836f9ffc29
2 changed files with 7 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ module Producer::Core
subject(:dsl) { Task::DSL.new &block }
describe '#evaluate' do
let(:block) { Proc.new { raise 'error from task' } }
let(:block) { proc { raise 'error from task' } }
it 'evaluates its code' do
expect { dsl.evaluate(env) }
@@ -16,7 +16,7 @@ module Producer::Core
describe '#condition' do
context 'when met (block evals to true)' do
let(:block) { Proc.new {
let(:block) { proc {
condition { true }
raise 'error after condition'
} }
@@ -28,7 +28,7 @@ module Producer::Core
end
context 'when not met (block evals to false)' do
let(:block) { Proc.new {
let(:block) { proc {
condition { false }
raise
} }