test/unit/svn_test.rb in vigetlabs-provisional-2.1.6 vs test/unit/svn_test.rb in vigetlabs-provisional-2.1.7
- old
+ new
@@ -28,11 +28,11 @@
Dir.expects(:chdir).with('name')
Provisional::RailsApplication.expects(:new)
@scm.generate_rails(false)
end
- def test_generate_rails_should_raise_RuntimeError_if_any_step_raises_any_exception
+ def test_generate_rails_should_fail_if_any_step_raises_any_exception
@scm.expects(:system).with("svn co --username=username --password=password url name")
Dir.expects(:chdir).with('name').raises(Errno::ENOENT)
assert_raise RuntimeError do
@scm.generate_rails
end
@@ -42,12 +42,19 @@
@scm.expects(:system).with("svn add *")
@scm.expects(:system).with("svn commit -m 'Initial commit by Provisional'")
@scm.checkin
end
- def test_checkin_should_raise_RuntimeError_if_any_step_raises_any_exception
+ def test_checkin_should_fail_if_any_step_raises_any_exception
@scm.expects(:system).with("svn add *").raises(RuntimeError)
assert_raise RuntimeError do
@scm.checkin
end
+ end
+
+ def test_provision_should_call_init_generate_rails_and_checkin
+ @scm.expects(:init)
+ @scm.expects(:generate_rails)
+ @scm.expects(:checkin)
+ @scm.provision
end
end