Skip to content

Commit

Permalink
We don't need to overwrite default paths in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drogus committed Sep 3, 2010
1 parent e4bd7ed commit 7d7263b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions railties/test/railties/engine_test.rb
Expand Up @@ -114,12 +114,11 @@ class Engine < ::Rails::Engine
@plugin.write "lib/bukkits.rb", <<-RUBY
class Bukkits
class Engine < ::Rails::Engine
paths.vendor.plugins = "#{File.join(@plugin.path, "lib/bukkits/plugins")}"
end
end
RUBY

@plugin.write "lib/bukkits/plugins/yaffle/init.rb", <<-RUBY
@plugin.write "vendor/plugins/yaffle/init.rb", <<-RUBY
config.yaffle_loaded = true
RUBY

Expand All @@ -132,13 +131,12 @@ class Engine < ::Rails::Engine
@plugin.write "lib/bukkits.rb", <<-RUBY
class Bukkits
class Engine < ::Rails::Engine
paths.public = "#{File.join(@plugin.path, "lib/bukkits/public")}"
config.serve_static_assets = true
end
end
RUBY

@plugin.write "lib/bukkits/public/omg.txt", <<-RUBY
@plugin.write "public/omg.txt", <<-RUBY
OMG
RUBY

Expand All @@ -151,7 +149,7 @@ class Engine < ::Rails::Engine
env = Rack::MockRequest.env_for("/bukkits/omg.txt")
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

0 comments on commit 7d7263b

Please sign in to comment.