apache-config-generator/spec/modules_spec.rb

26 lines
612 B
Ruby
Raw Normal View History

2010-05-04 21:04:44 +00:00
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 == [
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"',
2010-05-05 14:44:20 +00:00
'LoadModule "mine_module" "my_path"',
''
2010-05-04 21:04:44 +00:00
]
end
end