diff options
author | José Valim <jose.valim@gmail.com> | 2009-10-17 15:54:58 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-10-17 15:54:58 -0300 |
commit | 03c5a0e5c4c9888c54265d6ef97136854e0ff9e4 (patch) | |
tree | 2121d951588c2e0fe33b1af85461d8cb8f96ac91 /railties/test/generators | |
parent | cb873026898badc5c3dc61a95a08051cf218251f (diff) | |
download | rails-03c5a0e5c4c9888c54265d6ef97136854e0ff9e4.tar.gz rails-03c5a0e5c4c9888c54265d6ef97136854e0ff9e4.tar.bz2 rails-03c5a0e5c4c9888c54265d6ef97136854e0ff9e4.zip |
Make app generatoor specs green once again.
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 5d6a9f6de9..20f2a24e6d 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -114,11 +114,18 @@ class AppGeneratorTest < GeneratorsTestCase generator(:freeze => true, :database => "sqlite3").expects(:run). with("rake rails:freeze:edge", :verbose => false) silence(:stdout){ generator.invoke } - assert_file 'config/environment.rb', /# RAILS_GEM_VERSION/ + + assert_file 'Gemfile' do |content| + flag = %(gem "rails", "#{Rails::VERSION::STRING}", :git => "git://github.com/rails/rails.git") + assert_match /^#{Regexp.escape(flag)}$/, content + + flag = %(# gem "rails", "#{Rails::VERSION::STRING}") + assert_match /^#{Regexp.escape(flag)}$/, content + end end def test_template_from_dir_pwd - FileUtils.cd(RAILS_ROOT) + FileUtils.cd(Rails.root) assert_match /It works from file!/, run_generator(["-m", "lib/template.rb"]) end |