Browse files

Create initial test structure, but no asserts yet (now sure how yet)

  • Loading branch information...
1 parent f334cc2 commit c889804696318b6e3cfd4d2b07ab1acd2d9df915 @igorsobreira committed Mar 14, 2012
Showing with 29 additions and 0 deletions.
  1. +9 −0 Rakefile
  2. +1 −0 lib/vagrant-screenshot.rb
  3. +6 −0 test/test_helper.rb
  4. +13 −0 test/test_screenshot_command.rb
View
9 Rakefile
@@ -1 +1,10 @@
require "bundler/gem_tasks"
+
+desc "Run test suite"
+task :test do
+ $:.unshift File.expand_path("../test", __FILE__)
+
+ Dir["test/test_*"].each do |f|
+ load f
+ end
+end
View
1 lib/vagrant-screenshot.rb
@@ -1,3 +1,4 @@
+require "vagrant"
require "vagrant-screenshot/screenshot_command"
Vagrant.commands.register(:screenshot) { Vagrant::Command::ScreenshotCommand }
View
6 test/test_helper.rb
@@ -0,0 +1,6 @@
+require "minitest/autorun"
+require "vagrant-screenshot"
+
+class BaseTestCase < MiniTest::Unit::TestCase
+ include Vagrant::TestHelpers
+end
View
13 test/test_screenshot_command.rb
@@ -0,0 +1,13 @@
+require "test_helper"
+
+class ScreenshotCommand < BaseTestCase
+
+ def setup
+ @env = vagrant_env
+ end
+
+ def test_should_create_screenshots_for_all_actives_vms
+ @env.cli "vagrant", "screenshot"
+ end
+
+end

0 comments on commit c889804

Please sign in to comment.