diff options
author | Teng Siong Ong <siong1987@gmail.com> | 2011-05-18 10:08:34 +0800 |
---|---|---|
committer | Teng Siong Ong <siong1987@gmail.com> | 2011-05-18 10:08:34 +0800 |
commit | ea306da4eb8943dca13197ad9880df18e45a13a4 (patch) | |
tree | 3901edc5d732d6ec197a24b1c7ab508039dddef8 /railties/test/generators | |
parent | 5df9d0081bd9e624a143992c4f495bf80c96d7e5 (diff) | |
download | rails-ea306da4eb8943dca13197ad9880df18e45a13a4.tar.gz rails-ea306da4eb8943dca13197ad9880df18e45a13a4.tar.bz2 rails-ea306da4eb8943dca13197ad9880df18e45a13a4.zip |
add tests for ruby-debug gem in Gemfile and make sure that ruby-debug19 is used as long as RUBY_VERSION > '1.9'.
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 8c89c06e02..c1912c23b8 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -210,6 +210,20 @@ class AppGeneratorTest < Rails::Generators::TestCase end end + def test_inclusion_of_ruby_debug + run_generator + assert_file "Gemfile" do |contents| + assert_match /gem 'ruby-debug'/, contents if RUBY_VERSION < '1.9' + end + end + + def test_inclusion_of_ruby_debug19_if_ruby19 + run_generator + assert_file "Gemfile" do |contents| + assert_match /gem 'ruby-debug19', :require => 'ruby-debug'/, contents unless RUBY_VERSION < '1.9' + end + end + def test_template_from_dir_pwd FileUtils.cd(Rails.root) assert_match /It works from file!/, run_generator([destination_root, "-m", "lib/template.rb"]) |