[Git][noosfero/noosfero][master] restoring helper method to avoid colateral errors in tests
Joenio Costa
gitlab at mg.gitlab.com
Wed Mar 16 12:57:07 BRT 2016
Joenio Costa pushed to branch master at Noosfero / noosfero
Commits:
43b317df by Joenio Costa at 2016-03-16T12:54:40-03:00
restoring helper method to avoid colateral errors in tests
- - - - -
1 changed file:
- test/unit/disabled_enterprise_message_block_test.rb
Changes:
=====================================
test/unit/disabled_enterprise_message_block_test.rb
=====================================
--- a/test/unit/disabled_enterprise_message_block_test.rb
+++ b/test/unit/disabled_enterprise_message_block_test.rb
@@ -19,12 +19,17 @@ class DisabledEnterpriseMessageBlockTest < ActiveSupport::TestCase
block = enterprise.boxes.first.blocks.first
ApplicationHelper.class_eval do
+ alias_method :original_profile, :profile
def profile
return Enterprise['disabled-enterprise']
end
end
assert_match 'This message is for disabled enterprises', render_block_content(block)
+
+ ApplicationHelper.class_eval do
+ alias_method :profile, :original_profile
+ end
end
should 'not be editable' do
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/43b317df358d3e2d1960e6a453726fe81a6cd0a8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160316/e6e8f05c/attachment.html>
More information about the Noosfero-dev
mailing list