Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[cli] first pass at test setup

  • Loading branch information...
commit 58b9cd62fdad9cc7406ae72a1f8ebc9e869f66ba 1 parent 19930fb
Wesley Beary geemus authored
Showing with 25 additions and 0 deletions.
  1. +17 −0 tests/bin/cli_tests.rb
  2. +8 −0 tests/bin/helper.rb
17 tests/bin/cli_tests.rb
View
@@ -0,0 +1,17 @@
+Shindo.tests('cli_tests', 'cli') do
+
+ Thread.current[:formatador] = Formatador.new # reset indentation
+
+ EMPTY_SERVER_LISTING = Fog::Compute[:aws].servers.all.inspect + "\n"
+
+ empty_server_listing_implicit_arguments = 'aws:compute:servers --mock'
+ tests(empty_server_listing_implicit_arguments).returns(EMPTY_SERVER_LISTING) do
+ bin(empty_server_listing_implicit_arguments)
+ end
+
+ empty_server_listing_explicit_arguments = 'aws:compute:servers:all --mock'
+ tests(empty_server_listing_explicit_arguments).returns(EMPTY_SERVER_LISTING) do
+ bin(empty_server_listing_explicit_arguments)
+ end
+
+end
8 tests/bin/helper.rb
View
@@ -0,0 +1,8 @@
+require 'fog'
+require 'fog/bin' # for available_providers
+
+BIN = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'fog'))
+
+def bin(arguments)
+ `#{BIN} #{arguments}`
+end
Please sign in to comment.
Something went wrong with that request. Please try again.