diff options
Diffstat (limited to 'railties/test/generators/actions_test.rb')
-rw-r--r-- | railties/test/generators/actions_test.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 51fa2fe16f..c1fd6a38f1 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -95,11 +95,13 @@ class ActionsTest < Rails::Generators::TestCase def test_gem_should_insert_on_separate_lines run_generator + File.open('Gemfile', 'a') {|f| f.write('# Some content...') } + action :gem, 'rspec' action :gem, 'rspec-rails' - assert_file 'Gemfile', /gem "rspec"$/ - assert_file 'Gemfile', /gem "rspec-rails"$/ + assert_file 'Gemfile', /^gem "rspec"$/ + assert_file 'Gemfile', /^gem "rspec-rails"$/ end def test_gem_group_should_wrap_gems_in_a_group @@ -112,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 |