diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-13 10:23:09 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-13 10:24:10 -0700 |
commit | 0b2e0528df36bcef4aca62b86f55e1ea85604cd8 (patch) | |
tree | 800e5fb48592f4b690a643f06120c538622bc039 /railties | |
parent | 1302edf3e53a2322e3496588c0c06e7e882d3cc6 (diff) | |
download | rails-0b2e0528df36bcef4aca62b86f55e1ea85604cd8.tar.gz rails-0b2e0528df36bcef4aca62b86f55e1ea85604cd8.tar.bz2 rails-0b2e0528df36bcef4aca62b86f55e1ea85604cd8.zip |
Add the `method_source` gem to the default Gemfile
Fixes #18473
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG.md | 4 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 4 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 3e797e03cb..30b86db8bb 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Add the `method_source` gem to the default Gemfile for apps + + *Sean Griffin* + * Drop old test locations from `rake stats` - test/functional - test/unit diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 3659edcfcd..143673f711 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -36,6 +36,10 @@ group :development, :test do # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' <% end -%> + + # Adds `Method#source` and `Method#comment` to get the source code of a + # method from the console + gem 'method_source' <% end -%> end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 40fd7b77f1..5d270555ed 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -409,6 +409,13 @@ class AppGeneratorTest < Rails::Generators::TestCase end end + def test_inclusion_of_method_source + run_generator + assert_file "Gemfile" do |content| + assert_gem 'method_source' + end + end + def test_inclusion_of_doc run_generator assert_file 'Gemfile', /gem 'sdoc',\s+'~> 0.4.0',\s+group: :doc/ |