spec/warbler/config_spec.rb in warbler-0.9.14 vs spec/warbler/config_spec.rb in warbler-1.0
- old
+ new
@@ -1,17 +1,21 @@
#--
-# (c) Copyright 2007-2008 Sun Microsystems, Inc.
-# See the file LICENSES.txt included with the distribution for
-# software license details.
+# Copyright (c) 2010 Engine Yard, Inc.
+# Copyright (c) 2007-2009 Sun Microsystems, Inc.
+# This source code is available under the MIT license.
+# See the file LICENSE.txt for details.
#++
require File.dirname(__FILE__) + '/../spec_helper'
describe Warbler::Config do
+ before :each do
+ verbose(false)
+ end
+
it "should have suitable default values" do
config = Warbler::Config.new
- config.staging_dir.should == "tmp/war"
config.dirs.should include(*Warbler::Config::TOP_DIRS.select{|d| File.directory?(d)})
config.includes.should be_empty
config.java_libs.should_not be_empty
config.war_name.size.should > 0
config.webxml.should be_kind_of(OpenStruct)
@@ -19,13 +23,11 @@
config.pathmaps.public_html.should == ["%{public/,}p"]
end
it "should allow configuration through an initializer block" do
config = Warbler::Config.new do |c|
- c.staging_dir = "/var/tmp"
c.war_name = "mywar"
end
- config.staging_dir.should == "/var/tmp"
config.war_name.should == "mywar"
end
it "should allow gems to be added/changed with =, +=, -=, <<" do
config = Warbler::Config.new do |c|