spec/castronaut/configuration_spec.rb in relevance-castronaut-0.6.1 vs spec/castronaut/configuration_spec.rb in relevance-castronaut-0.7.4

- old
+ new

@@ -13,11 +13,11 @@ Castronaut::Configuration.stub!(:parse_yaml_config).and_return({}) config = Castronaut::Configuration.new config.stub!(:parse_config_into_settings) config.stub!(:connect_activerecord) - config.stub!(:setup_logger).and_return(stub_everything) + config.stub!(:setup_logger).and_return(stub({}).as_null_object) Castronaut::Configuration.stub!(:new).and_return(config) Castronaut::Configuration.load.config_file_path.should == './castronaut.yml' end @@ -25,11 +25,11 @@ Castronaut::Configuration.stub!(:parse_yaml_config).and_return({}) config = Castronaut::Configuration.new config.stub!(:parse_config_into_settings) config.stub!(:connect_activerecord) - config.stub!(:setup_logger).and_return(stub_everything) + config.stub!(:setup_logger).and_return(stub({}).as_null_object) Castronaut::Configuration.stub!(:new).and_return(config) Castronaut::Configuration.load("/foo/bar/baz").config_file_path.should == '/foo/bar/baz' end @@ -37,11 +37,11 @@ YAML.should_receive(:load_file).with(/castronaut\.example\.yml/).and_return({}) config = Castronaut::Configuration.new config.stub!(:parse_config_into_settings) config.stub!(:connect_activerecord) - config.stub!(:setup_logger).and_return(stub_everything) + config.stub!(:setup_logger).and_return(stub({}).as_null_object) Castronaut::Configuration.stub!(:new).and_return(config) Castronaut::Configuration.load(@test_config_file) end @@ -50,11 +50,11 @@ Castronaut::Configuration.stub!(:parse_yaml_config).and_return(config_hash) config = Castronaut::Configuration.new config.stub!(:parse_config_into_settings) config.stub!(:connect_activerecord) - config.stub!(:setup_logger).and_return(stub_everything) + config.stub!(:setup_logger).and_return(stub({}).as_null_object) Castronaut::Configuration.stub!(:new).and_return(config) Castronaut::Configuration.load(@test_config_file).config_hash = config_hash end @@ -70,11 +70,11 @@ it "creates an instance of Logger pointing to the log directory" do config = Castronaut::Configuration.new config.stub!(:connect_activerecord) Castronaut::Configuration.stub!(:new).and_return(config) - Hodel3000CompliantLogger.should_receive(:new).with("log/castronaut.log", anything).and_return(stub_everything) + Hodel3000CompliantLogger.should_receive(:new).with("log/castronaut.log", anything).and_return(stub({}).as_null_object) Castronaut::Configuration.load(@test_config_file) end it "exposes the logger at :logger" do @@ -88,10 +88,10 @@ it "rotates the logger daily" do config = Castronaut::Configuration.new config.stub!(:connect_activerecord) Castronaut::Configuration.stub!(:new).and_return(config) - Hodel3000CompliantLogger.should_receive(:new).with("log/castronaut.log", "daily").and_return(stub_everything) + Hodel3000CompliantLogger.should_receive(:new).with("log/castronaut.log", "daily").and_return(stub({}).as_null_object) Castronaut::Configuration.load(@test_config_file) end end