summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorMichael Fellinger <m.fellinger@gmail.com>2007-12-31 19:01:49 +0100
committerMichael Fellinger <m.fellinger@gmail.com>2007-12-31 19:01:49 +0100
commit46accb531e9988d3ce9870b52a70268e80c2f5b7 (patch)
tree695b4e29f0ec0d7c4882c21a81eeb336af4c496c /lib
parentd72986caf182355aa9dfefd38356354d4b39a22a (diff)
downloadbacon-46accb531e9988d3ce9870b52a70268e80c2f5b7.tar.gz
bacon-46accb531e9988d3ce9870b52a70268e80c2f5b7.tar.xz
bacon-46accb531e9988d3ce9870b52a70268e80c2f5b7.zip
behaves_like should take multiple names
darcs-hash:20071231180149-cbc08-3d48eabe8b6833561719082c904768bfc993a73a.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/bacon.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bacon.rb b/lib/bacon.rb
index dfc45e2..dac4a16 100644
--- a/lib/bacon.rb
+++ b/lib/bacon.rb
@@ -123,8 +123,10 @@ module Bacon
     def before(&block); @before << block; end
     def after(&block);  @after << block; end
 
-    def behaves_like(name)
-      instance_eval(&Shared[name])
+    def behaves_like(*names)
+      names.each do |name|
+        instance_eval(&Shared[name])
+      end
     end
 
     def it(description, &block)