$:.unshift File.join(File.dirname(__FILE__), "..", "..", "lib") require 'test/unit' require 'buildmaster' require 'mock' module BuildMaster class ReleaseTest < Test::Unit::TestCase def testRelease cvs_mock = Mock.new(CvsDriver) cvs_mock.expects(:checkout) cvs_mock.expects(:tag) cvs_mock.expects(:commit) builder_mock = Mock.new builder_mock.expects(:build) release = Release.new(cvs_mock, builder_mock) release.release_candidate('tag') cvs_mock.verify builder_mock.verify end end end