Simplify spec helper:

Move specific exception `SomeErrorInRecipe' in the only spec where it
is used.
This commit is contained in:
Thibault Jouan 2013-08-06 17:13:41 +00:00
parent d7d7d42223
commit 5d9a5f1f57
2 changed files with 4 additions and 5 deletions

View File

@ -4,6 +4,10 @@ module Producer::Core
describe Recipe::DSL do
include FixturesHelpers
# Specific error thrown in the error fixture recipe, we can't define it in
# the recipe, rspec wouldn't know about it.
SomeErrorInRecipe = Class.new(RuntimeError)
let(:code) { proc { } }
let(:env) { double('env').as_null_object }
subject(:dsl) { Recipe::DSL.new &code }

View File

@ -2,8 +2,3 @@ require 'producer/core'
require 'support/exit_helpers'
require 'support/fixtures_helpers'
# Specific error thrown in the error fixture recipe, we can't define it in the
# recipe, rspec wouldn't know about it.
SomeErrorInRecipe = Class.new(RuntimeError)