Commit 36e5b9ab7b43c506bcc0c0291414ea62ada199b7
1 parent
34de9463
Exists in
master
and in
28 other branches
Fix gross typo - word completion broke my legs
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
lib/noosfero/plugin/manager.rb
@@ -5,7 +5,7 @@ class Noosfero::Plugin::Manager | @@ -5,7 +5,7 @@ class Noosfero::Plugin::Manager | ||
5 | 5 | ||
6 | def initialize(environment, context) | 6 | def initialize(environment, context) |
7 | @environment = environment | 7 | @environment = environment |
8 | - @constantize = context | 8 | + @context = context |
9 | end | 9 | end |
10 | 10 | ||
11 | delegate :each, :to => :enabled_plugins | 11 | delegate :each, :to => :enabled_plugins |
test/unit/plugin_manager_test.rb
@@ -14,6 +14,11 @@ class PluginManagerTest < ActiveSupport::TestCase | @@ -14,6 +14,11 @@ class PluginManagerTest < ActiveSupport::TestCase | ||
14 | attr_reader :environment | 14 | attr_reader :environment |
15 | attr_reader :manager | 15 | attr_reader :manager |
16 | 16 | ||
17 | + should 'give access to environment and context' do | ||
18 | + assert_same @environment, @manager.environment | ||
19 | + assert_same @controller, @manager.context | ||
20 | + end | ||
21 | + | ||
17 | should 'return the intersection between environment\'s enabled plugins and system available plugins' do | 22 | should 'return the intersection between environment\'s enabled plugins and system available plugins' do |
18 | class Plugin1 < Noosfero::Plugin; end; | 23 | class Plugin1 < Noosfero::Plugin; end; |
19 | class Plugin2 < Noosfero::Plugin; end; | 24 | class Plugin2 < Noosfero::Plugin; end; |