spec/unit/cli/commands/cmd_api_spec.rb in gooddata-0.6.0.pre11 vs spec/unit/cli/commands/cmd_api_spec.rb in gooddata-0.6.0

- old
+ new

@@ -1,11 +1,28 @@ require 'gooddata/cli/cli' describe GoodData::CLI do it "Has working 'api' command" do - args = [ - 'api' - ] + args = %w(api) - GoodData::CLI.main(args) + out = run_cli(args) + out.should include("Command 'api' requires a subcommand info,get") + end + + it "Has working 'api info' command" do + args = %w(api info) + + run_cli(args) + end + + it "Has working 'api get' command" do + args = %w(api get) + + run_cli(args) + end + + it "Has working 'api get /gdc' command" do + args = %w(api get /gdc) + + run_cli(args) end end \ No newline at end of file