Commit 42340c3b46e34a03dd88234940d515c073630784
1 parent
909de186
Exists in
master
and in
29 other branches
ActionItem154: when no block is given to should, just mark the test as pending
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1329 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
test/test_helper.rb
@@ -47,7 +47,13 @@ class Test::Unit::TestCase | @@ -47,7 +47,13 @@ class Test::Unit::TestCase | ||
47 | end | 47 | end |
48 | 48 | ||
49 | @shoulds << destname | 49 | @shoulds << destname |
50 | - self.send(:define_method, destname, &block) | 50 | + if block_given? |
51 | + self.send(:define_method, destname, &block) | ||
52 | + else | ||
53 | + self.send(:define_method, destname) do | ||
54 | + flunk 'pending' | ||
55 | + end | ||
56 | + end | ||
51 | 57 | ||
52 | end | 58 | end |
53 | 59 |