apache-config-generator/spec/apache/modules_spec.rb
2010-11-24 14:36:09 -05:00

26 lines
612 B
Ruby

require 'apache/modules'
describe Apache::Modules, "should build a list of modules" do
before do
Apache::Modules.reset!
end
it "should handle method_missing" do
Apache::Modules.mine
Apache::Modules.modules.should == [ 'LoadModule "mine_module" "modules/mod_mine.so"' ]
end
it "should build a set of modules" do
Apache::Modules.build(:this, :that) do
mine "my_path"
end.should == [
'',
'LoadModule "this_module" "modules/mod_this.so"',
'LoadModule "that_module" "modules/mod_that.so"',
'LoadModule "mine_module" "my_path"',
''
]
end
end