Permalink
Browse files

Debrittlize tests somewhat - fix for CI build

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent f84b4b4 commit 7d76474e5da6c1c06eb831fe436f12591cca4339 @mikel mikel committed with josevalim Feb 10, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 railties/test/generators/app_generator_test.rb
@@ -74,13 +74,13 @@ def test_application_names_are_not_singularized
def test_config_database_is_added_by_default
run_generator
assert_file "config/database.yml", /sqlite3/
- assert_file "Gemfile", /^gem "sqlite3-ruby", :require => "sqlite3"$/
+ assert_file "Gemfile", /^gem\s+["']sqlite3-ruby["'],\s+:require\s+=>\s+["']sqlite3["']$/
end
def test_config_another_database
run_generator([destination_root, "-d", "mysql"])
assert_file "config/database.yml", /mysql/
- assert_file "Gemfile", /^gem "mysql"$/
+ assert_file "Gemfile", /^gem\s+["']mysql["']$/
end
def test_config_database_is_not_added_if_skip_activerecord_is_given
@@ -90,7 +90,7 @@ def test_config_database_is_not_added_if_skip_activerecord_is_given
def test_activerecord_is_removed_from_frameworks_if_skip_activerecord_is_given
run_generator [destination_root, "--skip-activerecord"]
- assert_file "config/application.rb", /# require "active_record\/railtie"/
+ assert_file "config/application.rb", /#\s+require\s+["']active_record\/railtie["']/
end
def test_prototype_and_test_unit_are_added_by_default
@@ -159,14 +159,14 @@ def test_dev_option
silence(:stdout){ generator.invoke }
rails_path = File.expand_path('../../..', Rails.root)
dev_gem = %(gem "rails", :path => #{rails_path.inspect})
- assert_file 'Gemfile', /^#{Regexp.escape(dev_gem)}$/
+ assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:path\s+=>\s+["']\/Users\/mikel\/rails_programs\/rails["']$/
end
def test_edge_option
generator([destination_root], :edge => true).expects(:run).with("bundle install")
silence(:stdout){ generator.invoke }
edge_gem = %(gem "rails", :git => "git://github.com/rails/rails.git")
- assert_file 'Gemfile', /^#{Regexp.escape(edge_gem)}$/
+ assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:git\s+=>\s+["']git:\/\/github\.com\/rails\/rails\.git["']$/
end
protected

0 comments on commit 7d76474

Please sign in to comment.