spec/unit/spec_helper.rb in blueprints-0.7.3 vs spec/unit/spec_helper.rb in blueprints-0.8.0
- old
+ new
@@ -12,6 +12,15 @@
require 'spec'
require 'lib/blueprints'
Spec::Runner.configure do |config|
config.mock_with :mocha
+
+ config.before do
+ Blueprints::Namespace.root.instance_variable_set(:@context, Blueprints::Context.new)
+ @mock = Mocha::Mockery.instance.unnamed_mock
+ end
+
+ config.after do
+ Blueprints::Namespace.root.children.clear
+ end
end