require 'spec_ext' Spec::Example::ExampleGroup.class_eval do def self.swap_metadata old_metadata = nil before :all do old_metadata = Micon.metadata Micon.swap_metadata old_metadata.deep_clone end after :all do Micon.swap_metadata old_metadata end end def self.with_environment environment = :test swap_metadata before :each do crystal.clear crystal[:config].environment = environment end after :each do crystal.clear end end inject( :config => :config, :logger => :logger ) def silence_logger! self.logger = Logger.new nil end end # Spec::Runner.configure do |config| # end