Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

We're using module not class for namespacing

  • Loading branch information...
commit d111de8139b5d44945afb1a4ecd5960fcba6b366 1 parent b747676
@flippingbits flippingbits authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 railties/test/railties/engine_test.rb
View
16 railties/test/railties/engine_test.rb
@@ -15,7 +15,7 @@ def setup
@plugin = engine "bukkits" do |plugin|
plugin.write "lib/bukkits.rb", <<-RUBY
- class Bukkits
+ module Bukkits
class Engine < ::Rails::Engine
railtie_name "bukkits"
end
@@ -32,7 +32,7 @@ class Engine < ::Rails::Engine
test "initializers are executed after application configuration initializers" do
@plugin.write "lib/bukkits.rb", <<-RUBY
- class Bukkits
+ module Bukkits
class Engine < ::Rails::Engine
initializer "dummy_initializer" do
end
@@ -73,7 +73,7 @@ def call(env)
add_to_config("config.action_dispatch.show_exceptions = false")
@plugin.write "lib/bukkits.rb", <<-RUBY
- class Bukkits
+ module Bukkits
class Engine < ::Rails::Engine
endpoint lambda { |env| [200, {'Content-Type' => 'text/html'}, ['Hello World']] }
config.middleware.use ::RailtiesTest::EngineTest::Upcaser
@@ -123,7 +123,7 @@ def index
test "it provides routes as default endpoint" do
@plugin.write "lib/bukkits.rb", <<-RUBY
- class Bukkits
+ module Bukkits
class Engine < ::Rails::Engine
end
end
@@ -149,7 +149,7 @@ class Engine < ::Rails::Engine
test "engine can load its own plugins" do
@plugin.write "lib/bukkits.rb", <<-RUBY
- class Bukkits
+ module Bukkits
class Engine < ::Rails::Engine
end
end
@@ -166,7 +166,7 @@ class Engine < ::Rails::Engine
test "engine does not load plugins that already exists in application" do
@plugin.write "lib/bukkits.rb", <<-RUBY
- class Bukkits
+ module Bukkits
class Engine < ::Rails::Engine
end
end
@@ -189,7 +189,7 @@ class Engine < ::Rails::Engine
test "it loads its environment file" do
@plugin.write "lib/bukkits.rb", <<-RUBY
- class Bukkits
+ module Bukkits
class Engine < ::Rails::Engine
end
end
@@ -208,7 +208,7 @@ class Engine < ::Rails::Engine
test "it passes router in env" do
@plugin.write "lib/bukkits.rb", <<-RUBY
- class Bukkits
+ module Bukkits
class Engine < ::Rails::Engine
endpoint lambda { |env| [200, {'Content-Type' => 'text/html'}, 'hello'] }
end
Please sign in to comment.
Something went wrong with that request. Please try again.