test/unit/svn_test.rb in vigetlabs-provisional-2.1.1 vs test/unit/svn_test.rb in vigetlabs-provisional-2.1.2
- old
+ new
@@ -33,9 +33,20 @@
generator_stub.expects(:run).with(%w(. -m template_path), :generator => 'app')
Rails::Generator::Scripts::Generate.expects(:new).returns(generator_stub)
@scm.generate_rails
end
+ def test_generate_rails_can_optionally_skip_svn_structure_creation
+ @scm.expects(:system).with("svn co --username=username --password=password url name")
+ Dir.expects(:chdir).with('name')
+ Dir.expects(:chdir).with('trunk')
+ Rails::Generator::Base.expects(:use_application_sources!)
+ generator_stub = stub()
+ generator_stub.expects(:run).with(%w(. -m template_path), :generator => 'app')
+ Rails::Generator::Scripts::Generate.expects(:new).returns(generator_stub)
+ @scm.generate_rails(false)
+ end
+
def test_generate_rails_should_raise_RuntimeError_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