1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix a couple failing tests.

This commit is contained in:
José Valim 2010-02-10 08:33:41 +01:00
parent 9c654744fb
commit 97650bf54a

View file

@ -158,15 +158,13 @@ class AppGeneratorTest < Rails::Generators::TestCase
generator([destination_root], :dev => true).expects(:run).with("bundle install")
silence(:stdout){ generator.invoke }
rails_path = File.expand_path('../../..', Rails.root)
dev_gem = %(gem "rails", :path => #{rails_path.inspect})
assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:path\s+=>\s+["']\/Users\/mikel\/rails_programs\/rails["']$/
assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:path\s+=>\s+["']#{Regexp.escape(rails_path)}["']$/
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', /^gem\s+["']rails["'],\s+:git\s+=>\s+["']git:\/\/github\.com\/rails\/rails\.git["']$/
assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["']$/
end
protected