mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #3924 from laserlemon/readme-ext
Add the .rdoc extension to the README that Rails generates for a new app
This commit is contained in:
@@ -38,7 +38,7 @@ module Rails
|
||||
end
|
||||
|
||||
def readme
|
||||
copy_file "README"
|
||||
copy_file "README", "README.rdoc"
|
||||
end
|
||||
|
||||
def gemfile
|
||||
|
||||
@@ -114,7 +114,7 @@ class ActionsTest < Rails::Generators::TestCase
|
||||
action :gem_group, :test do
|
||||
gem 'fakeweb'
|
||||
end
|
||||
|
||||
|
||||
assert_file 'Gemfile', /\ngroup :development, :test do\n gem "rspec-rails"\nend\n\ngroup :test do\n gem "fakeweb"\nend/
|
||||
end
|
||||
|
||||
@@ -233,14 +233,14 @@ class ActionsTest < Rails::Generators::TestCase
|
||||
def test_readme
|
||||
run_generator
|
||||
Rails::Generators::AppGenerator.expects(:source_root).times(2).returns(destination_root)
|
||||
assert_match(/Welcome to Rails/, action(:readme, "README"))
|
||||
assert_match(/Welcome to Rails/, action(:readme, "README.rdoc"))
|
||||
end
|
||||
|
||||
def test_readme_with_quiet
|
||||
generator(default_arguments, :quiet => true)
|
||||
run_generator
|
||||
Rails::Generators::AppGenerator.expects(:source_root).times(2).returns(destination_root)
|
||||
assert_no_match(/Welcome to Rails/, action(:readme, "README"))
|
||||
assert_no_match(/Welcome to Rails/, action(:readme, "README.rdoc"))
|
||||
end
|
||||
|
||||
def test_log
|
||||
|
||||
Reference in New Issue
Block a user