Permalink
Browse files

Initial import and first test

  • Loading branch information...
0 parents commit 7349faa9246f79dec38a11e9faa53d2c088292c1 @proffalken committed Aug 6, 2011
Showing with 26 additions and 0 deletions.
  1. +12 −0 Rakefile
  2. +5 −0 lib/capistrano-cobbler.rb
  3. +9 −0 test/cobbler_connection_test.rb
@@ -0,0 +1,12 @@
+require 'rake'
+require 'rake/testtask'
+
+task :test => [:test_units]
+
+desc "Run basic tests"
+Rake::TestTask.new("test_units") { |t|
+ t.pattern = 'test/*_test.rb'
+ t.verbose = true
+ t.warning = true
+}
+
@@ -0,0 +1,5 @@
+class CapistranoCobbler
+ def initialize(cobbler_server = '')
+ @cblr_svr = cobbler_server
+ end
+end
@@ -0,0 +1,9 @@
+require 'test/unit'
+require 'capistrano-cobbler'
+
+class TestCobblerConnections < Test::Unit::TestCase
+ def test_server_url
+ cobbler_connection = CapCob::new(server='localhost')
+ assert_raise(GeneralException){'Could not connect to cobbler server on localhost'}
+ end
+end

0 comments on commit 7349faa

Please sign in to comment.