spec/invoker/power/setup/osx_setup_spec.rb in invoker-1.2.0 vs spec/invoker/power/setup/osx_setup_spec.rb in invoker-1.3.0

- old
+ new

@@ -3,11 +3,10 @@ describe Invoker::Power::OsxSetup do describe "When no setup exists" do it "should create a config file with port etc" do setup = Invoker::Power::OsxSetup.new setup.expects(:install_resolver).returns(true) - setup.expects(:flush_dns_rules).returns(true) setup.expects(:drop_to_normal_user).returns(true) setup.expects(:install_firewall).once setup.setup_invoker @@ -39,11 +38,10 @@ describe "when user selects to overwrite it" do it "should run setup normally" do @setup.expects(:setup_resolver_file).returns(true) @setup.expects(:drop_to_normal_user).returns(true) @setup.expects(:install_resolver).returns(true) - @setup.expects(:flush_dns_rules).returns(true) @setup.expects(:install_firewall).once() @setup.setup_invoker end end @@ -51,11 +49,10 @@ describe "when user chose not to overwrite it" do it "should abort the setup process" do @setup.expects(:setup_resolver_file).returns(false) @setup.expects(:install_resolver).never - @setup.expects(:flush_dns_rules).never @setup.expects(:install_firewall).never @setup.setup_invoker end end @@ -66,11 +63,10 @@ setup = Invoker::Power::OsxSetup.new Invoker::CLI::Question.expects(:agree).returns(true) setup.expects(:remove_resolver_file).once setup.expects(:unload_firewall_rule).with(true).once - setup.expects(:flush_dns_rules).once Invoker::Power::Config.expects(:delete).once setup.uninstall_invoker end end @@ -83,10 +79,9 @@ end it "should create the directory and install" do @setup.expects(:setup_resolver_file).returns(true) @setup.expects(:drop_to_normal_user).returns(true) - @setup.expects(:flush_dns_rules).returns(true) @setup.expects(:install_firewall).once() @setup.setup_invoker expect(Dir.exist?(Invoker::Power::OsxSetup::RESOLVER_DIR)).to be_truthy end