Skip to content
Browse files

cleanup and stub target.update

  • Loading branch information...
1 parent 2f51d6e commit aa8e20bfececc97a40e263fe15fb74676e0bcca5 @effkay committed Apr 1, 2012
Showing with 6 additions and 9 deletions.
  1. +6 −9 spec/blazing/commands_spec.rb
View
15 spec/blazing/commands_spec.rb
@@ -8,7 +8,6 @@ module Blazing
let(:config_instance) { Blazing::Config.new }
let(:config) do
-
config = config_instance
# TODO: Split dsl and config object so i can access stuff directly and mock better
@@ -24,17 +23,10 @@ module Blazing
let(:commands_instance) { commands.new }
before :each do
- # TODO: Big Codesmell that I have to define those here!
+ # TODO: Big Codesmell that I have to define those here!?
class Recipe::RecipeA < Blazing::Recipe; end
class Recipe::RecipeB < Blazing::Recipe; end
Config.stub(:parse).and_return(config)
- #config.instance.stub(:recipe).and_return()
- end
-
- after :each do
- #Recipe
- #Recipe.send(:class)
- #Recipe.send(:remove_const, :RecipeB)
end
describe '.new' do
@@ -82,6 +74,11 @@ class Recipe::RecipeB < Blazing::Recipe; end
let(:specified_target) { targets.find { |t| t.name == :target_a } }
let(:other_target) { targets.find { |t| t.name == :target_b } }
+ before :each do
+ specified_target.stub(:update)
+ other_target.stub(:update)
+ end
+
it 'runs the setup method on the specified target' do
specified_target.should_receive(:setup)
other_target.should_not_receive(:setup)

0 comments on commit aa8e20b

Please sign in to comment.
Something went wrong with that request. Please try again.