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

Environment in engines tests is required on boot_rails, no need to require explicitly

This commit is contained in:
Piotr Sarnacki 2012-03-13 20:27:36 +01:00
parent 5e754a0a98
commit 52bfb48745

View file

@ -832,8 +832,6 @@ YAML
boot_rails boot_rails
require "#{rails_root}/config/environment"
get("/foo") get("/foo")
assert_equal "foo", last_response.body assert_equal "foo", last_response.body
@ -867,7 +865,6 @@ YAML
RUBY RUBY
boot_rails boot_rails
require "#{rails_root}/config/environment"
app_generators = Rails.application.config.generators.options[:rails] app_generators = Rails.application.config.generators.options[:rails]
assert_equal :mongoid , app_generators[:orm] assert_equal :mongoid , app_generators[:orm]
@ -890,7 +887,6 @@ YAML
RUBY RUBY
boot_rails boot_rails
require "#{rails_root}/config/environment"
generators = Bukkits::Engine.config.generators.options[:rails] generators = Bukkits::Engine.config.generators.options[:rails]
assert_equal :active_record, generators[:orm] assert_equal :active_record, generators[:orm]
@ -914,7 +910,6 @@ YAML
RUBY RUBY
boot_rails boot_rails
require "#{rails_root}/config/environment"
assert_equal "foo", Bukkits.table_name_prefix assert_equal "foo", Bukkits.table_name_prefix
end end
@ -928,7 +923,6 @@ YAML
RUBY RUBY
boot_rails boot_rails
require "#{rails_root}/config/environment"
assert_equal Bukkits::Engine.instance, Rails::Engine.find(@plugin.path) assert_equal Bukkits::Engine.instance, Rails::Engine.find(@plugin.path)
@ -976,7 +970,6 @@ YAML
add_to_config("config.action_dispatch.show_exceptions = false") add_to_config("config.action_dispatch.show_exceptions = false")
boot_rails boot_rails
require "#{rails_root}/config/environment"
methods = Bukkits::Engine.helpers.public_instance_methods.collect(&:to_s).sort methods = Bukkits::Engine.helpers.public_instance_methods.collect(&:to_s).sort
expected = ["bar", "baz"] expected = ["bar", "baz"]
@ -1055,7 +1048,6 @@ YAML
add_to_config("config.railties_order = [:all, :main_app, Blog::Engine]") add_to_config("config.railties_order = [:all, :main_app, Blog::Engine]")
boot_rails boot_rails
require "#{rails_root}/config/environment"
get("/foo") get("/foo")
assert_equal "Bukkit's foo partial", last_response.body.strip assert_equal "Bukkit's foo partial", last_response.body.strip
@ -1103,7 +1095,6 @@ YAML
add_to_config("config.railties_order = [Bukkits::Engine]") add_to_config("config.railties_order = [Bukkits::Engine]")
boot_rails boot_rails
require "#{rails_root}/config/environment"
get("/foo") get("/foo")
assert_equal "Bukkit's foo partial", last_response.body.strip assert_equal "Bukkit's foo partial", last_response.body.strip
@ -1150,7 +1141,6 @@ YAML
RUBY RUBY
boot_rails boot_rails
require "#{rails_root}/config/environment"
expected = <<-TEXT expected = <<-TEXT
script_name: script_name: