apache-config-generator/spec/master_spec.rb

28 lines
658 B
Ruby
Raw Normal View History

2010-05-04 21:04:44 +00:00
require 'apache/config'
describe Apache::Master, "should provide basic helpers for configuration" do
before do
Apache::Config.reset!
end
it "should build the modules with the provided block" do
Apache::Config.modules(:this, :that) do
my "is here"
end
Apache::Config.config.should == [
2010-05-05 14:44:20 +00:00
'',
2010-05-04 21:04:44 +00:00
'LoadModule "this_module" "modules/mod_this.so"',
'LoadModule "that_module" "modules/mod_that.so"',
'LoadModule "my_module" "is here"',
2010-05-05 14:44:20 +00:00
''
2010-05-04 21:04:44 +00:00
]
end
2010-05-05 14:44:20 +00:00
it "should set up the runner" do
Apache::Config.runner('test', 'test2')
Apache::Config.config.should == [ 'User test', 'Group test2' ]
end
2010-05-04 21:04:44 +00:00
end