spec/adhearsion/drb/plugin_spec.rb in adhearsion-drb-1.0.0 vs spec/adhearsion/drb/plugin_spec.rb in adhearsion-drb-1.1.0
- old
+ new
@@ -7,23 +7,23 @@
it "should retrieve a valid configuration instance" do
Adhearsion.config.adhearsion_drb.should be_instance_of Loquacious::Configuration
end
- it "should configure properly the host" do
+ it "should listen on localhost by default" do
Adhearsion.config.adhearsion_drb.host.should == "localhost"
end
- it "should configure properly the port" do
+ it "should use the default port of 9050" do
Adhearsion.config.adhearsion_drb.port.should == 9050
end
- it "should configure properly the deny access" do
+ it "should default to an empty deny acl" do
Adhearsion.config.adhearsion_drb.acl.deny.should have(0).hosts
end
- it "should configure properly the allow access" do
+ it "should default to an allow acl of only 127.0.0.1" do
subject.adhearsion_drb.acl.allow.should == ["127.0.0.1"]
end
end
@@ -73,12 +73,14 @@
end
end
describe "while initializing" do
+ after { Adhearsion::Drb::Service.stop }
+
it "should start the service" do
- Adhearsion::Drb::Plugin::Service.should_receive(:start).and_return true
+ Adhearsion::Drb::Service.user_stopped = false
+ Adhearsion::Drb::Service.should_receive(:start).and_return true
Adhearsion::Plugin.init_plugins
end
-
end
-end
\ No newline at end of file
+end