mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
We don't need to overwrite default paths in tests
This commit is contained in:
parent
e4bd7ed2fa
commit
7d7263bf9d
1 changed files with 3 additions and 5 deletions
|
@ -114,12 +114,11 @@ module RailtiesTest
|
||||||
@plugin.write "lib/bukkits.rb", <<-RUBY
|
@plugin.write "lib/bukkits.rb", <<-RUBY
|
||||||
class Bukkits
|
class Bukkits
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
paths.vendor.plugins = "#{File.join(@plugin.path, "lib/bukkits/plugins")}"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
@plugin.write "lib/bukkits/plugins/yaffle/init.rb", <<-RUBY
|
@plugin.write "vendor/plugins/yaffle/init.rb", <<-RUBY
|
||||||
config.yaffle_loaded = true
|
config.yaffle_loaded = true
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
|
@ -132,13 +131,12 @@ module RailtiesTest
|
||||||
@plugin.write "lib/bukkits.rb", <<-RUBY
|
@plugin.write "lib/bukkits.rb", <<-RUBY
|
||||||
class Bukkits
|
class Bukkits
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
paths.public = "#{File.join(@plugin.path, "lib/bukkits/public")}"
|
|
||||||
config.serve_static_assets = true
|
config.serve_static_assets = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
@plugin.write "lib/bukkits/public/omg.txt", <<-RUBY
|
@plugin.write "public/omg.txt", <<-RUBY
|
||||||
OMG
|
OMG
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
|
@ -151,7 +149,7 @@ module RailtiesTest
|
||||||
env = Rack::MockRequest.env_for("/bukkits/omg.txt")
|
env = Rack::MockRequest.env_for("/bukkits/omg.txt")
|
||||||
response = Rails::Application.call(env)
|
response = Rails::Application.call(env)
|
||||||
|
|
||||||
assert_equal response[2].path, File.join(@plugin.path, "lib/bukkits/public/omg.txt")
|
assert_equal response[2].path, File.join(@plugin.path, "public/omg.txt")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue