mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
pluging generator test fix
This commit is contained in:
parent
d10f268d20
commit
5a4e8f5514
1 changed files with 8 additions and 8 deletions
|
@ -69,13 +69,13 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
|
|||
def test_database_entry_is_generated_for_sqlite3_by_default_in_full_mode
|
||||
run_generator([destination_root, "--full"])
|
||||
assert_file "test/dummy/config/database.yml", /sqlite/
|
||||
assert_file "Gemfile", /^gem\s+["']sqlite3["']$/
|
||||
assert_file "bukkits.gemspec", /sqlite3/
|
||||
end
|
||||
|
||||
def test_config_another_database
|
||||
run_generator([destination_root, "-d", "mysql", "--full"])
|
||||
assert_file "test/dummy/config/database.yml", /mysql/
|
||||
assert_file "Gemfile", /^gem\s+["']mysql2["']$/
|
||||
assert_file "bukkits.gemspec", /mysql/
|
||||
end
|
||||
|
||||
def test_active_record_is_removed_from_frameworks_if_skip_active_record_is_given
|
||||
|
@ -117,8 +117,8 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
|
|||
assert_match %r{^//= require jquery}, contents
|
||||
assert_match %r{^//= require jquery_ujs}, contents
|
||||
end
|
||||
assert_file 'Gemfile' do |contents|
|
||||
assert_match(/^gem 'jquery-rails'/, contents)
|
||||
assert_file 'bukkits.gemspec' do |contents|
|
||||
assert_match(/jquery-rails/, contents)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -128,8 +128,8 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
|
|||
assert_match %r{^//= require prototype}, contents
|
||||
assert_match %r{^//= require prototype_ujs}, contents
|
||||
end
|
||||
assert_file 'Gemfile' do |contents|
|
||||
assert_match(/^gem 'prototype-rails'/, contents)
|
||||
assert_file 'bukkits.gemspec' do |contents|
|
||||
assert_match(/prototype-rails/, contents)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -205,10 +205,10 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
|
|||
|
||||
def test_creating_gemspec
|
||||
run_generator
|
||||
assert_file "bukkits.gemspec", /s.name = "bukkits"/
|
||||
assert_file "bukkits.gemspec", /s.name\s+= "bukkits"/
|
||||
assert_file "bukkits.gemspec", /s.files = Dir\["\{app,config,db,lib\}\/\*\*\/\*"\]/
|
||||
assert_file "bukkits.gemspec", /s.test_files = Dir\["test\/\*\*\/\*"\]/
|
||||
assert_file "bukkits.gemspec", /s.version = "0.0.1"/
|
||||
assert_file "bukkits.gemspec", /s.version\s+ = Bukkits::VERSION/
|
||||
end
|
||||
|
||||
def test_usage_of_engine_commands
|
||||
|
|
Loading…
Reference in a new issue