Commit 06ed6bdd2116472f8f0533a6bb1348cdc8d12485
1 parent
4836f514
Exists in
master
and in
22 other branches
ActionItem14: checkpoint
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@695 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
12 additions
and
18 deletions
Show diff stats
app/models/create_enterprise.rb
| @@ -85,15 +85,13 @@ class CreateEnterprise < Task | @@ -85,15 +85,13 @@ class CreateEnterprise < Task | ||
| 85 | _('Enterprise registration: "%s"') % self.name | 85 | _('Enterprise registration: "%s"') % self.name |
| 86 | end | 86 | end |
| 87 | 87 | ||
| 88 | - def task_created_message | ||
| 89 | - | ||
| 90 | - end | ||
| 91 | - | ||
| 92 | - def task_finished_message | ||
| 93 | - end | 88 | + #def task_created_message |
| 89 | + #end | ||
| 94 | 90 | ||
| 95 | - def task_cancelled_message | ||
| 96 | - end | 91 | + #def task_finished_message |
| 92 | + #end | ||
| 97 | 93 | ||
| 94 | + #def task_cancelled_message | ||
| 95 | + #end | ||
| 98 | 96 | ||
| 99 | end | 97 | end |
test/unit/create_enterprise_test.rb
| @@ -106,16 +106,12 @@ class CreateEnterpriseTest < Test::Unit::TestCase | @@ -106,16 +106,12 @@ class CreateEnterpriseTest < Test::Unit::TestCase | ||
| 106 | assert_equal person.user, enterprise.user | 106 | assert_equal person.user, enterprise.user |
| 107 | end | 107 | end |
| 108 | 108 | ||
| 109 | - should 'give a proper "task created" message' do | ||
| 110 | - flunk 'need to write this test' | ||
| 111 | - end | ||
| 112 | - | ||
| 113 | - should 'give a proper "task finished" message' do | ||
| 114 | - flunk 'need to write this test' | ||
| 115 | - end | ||
| 116 | - | ||
| 117 | - should 'give a proper "task cancelled" message' do | ||
| 118 | - flunk 'need to write this test' | 109 | + should 'override message methods from Task' do |
| 110 | + generic = Task.new | ||
| 111 | + specific = CreateEnterprise.new | ||
| 112 | + Task.instance_methods.select { |m| m =~ /_message$/ }.each do |method| | ||
| 113 | + assert_not_equal generic.send(method), specific.send(method) | ||
| 114 | + end | ||
| 119 | end | 115 | end |
| 120 | 116 | ||
| 121 | end | 117 | end |