test/buildmaster/tc_ant_driver.rb in BuildMaster-0.8.1 vs test/buildmaster/tc_ant_driver.rb in BuildMaster-0.9.0

- old
+ new

@@ -1,35 +1,33 @@ $:.unshift File.join(File.dirname(__FILE__), "..", "..", "lib") -require 'test/unit' +require 'spec' require 'buildmaster' +require 'buildmaster/cotta' module BuildMaster -class AntTest < Test::Unit::TestCase - protected - def setup - super - build_file = File.join(File.dirname(__FILE__), "build.xml") +context 'AntTest' do + setup do + cotta = Cotta.new() + build_file = cotta.file(__FILE__).parent.file('build.xml') @ant = AntDriver.from_file(build_file) end - public - - def test_run + specify 'run' do @ant.project_help end - def test_pass + specify 'pass' do @ant.target('passing') end - def test_dynamic_method + specify 'dynamic_method' do @ant.passing end - def test_fail - assert_raise(RuntimeError) {@ant.target('failing')} + specify 'fail' do + lambda {@ant.target('failing')}.should_raise CommandError end end end \ No newline at end of file