提交 b823e50a 编写于 作者: S Steve Agalloco 提交者: Santiago Pastorino

fix for rails app generator when using --pretend option

[#5245 state:committed]
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
上级 d277b823
......@@ -216,7 +216,7 @@ def create_root
empty_directory '.'
set_default_accessors!
FileUtils.cd(destination_root)
FileUtils.cd(destination_root) unless options[:pretend]
end
def create_root_files
......
......@@ -58,6 +58,12 @@ def test_application_skeleton_is_created
DEFAULT_APP_FILES.each{ |path| assert_file path }
end
def test_application_generate_pretend
run_generator ["testapp", "--pretend"]
DEFAULT_APP_FILES.each{ |path| assert_no_file path }
end
def test_application_controller_and_layout_files
run_generator
assert_file "app/views/layouts/application.html.erb", /stylesheet_link_tag :all/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册