test/unit/git_test.rb in vigetlabs-provisional-2.1.6 vs test/unit/git_test.rb in vigetlabs-provisional-2.1.7

- old
+ new

@@ -12,11 +12,11 @@ Dir.expects(:chdir).with('name') Git.expects(:init) @scm.init end - def test_init_should_raise_RuntimeError_if_any_step_raises_any_exception + def test_init_should_fail_if_any_step_raises_any_exception FileUtils.expects(:mkdir_p).with('name').raises(Errno::EEXIST) assert_raise RuntimeError do @scm.init end end @@ -24,11 +24,11 @@ def test_generate_rails Provisional::RailsApplication.expects(:new) @scm.generate_rails 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 Provisional::RailsApplication.expects(:new).raises(RuntimeError) assert_raise RuntimeError do @scm.generate_rails end end @@ -36,12 +36,19 @@ def test_checkin stub_git_checkin @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 Git.expects(:open).raises(ArgumentError) 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