test/vagrant/commands/status_test.rb in vagrant-0.3.4 vs test/vagrant/commands/status_test.rb in vagrant-0.4.0

- old
+ new

@@ -13,8 +13,28 @@ @instance = @klass.new(@env) end context "executing" do - # TODO + should "show local status by default" do + @instance.expects(:show_local_status).once + @instance.expects(:show_global_status).never + @instance.execute + end + + should "show global status if flagged" do + @instance.expects(:show_local_status).never + @instance.expects(:show_global_status).once + @instance.execute(["--global"]) + end + + should "show help if too many args are given" do + @instance.expects(:show_help).once + @instance.execute(["1","2","3"]) + end + + should "pass the VM name to local status if given" do + @instance.expects(:show_local_status).with("foo").once + @instance.execute(["foo"]) + end end end