From 46accb531e9988d3ce9870b52a70268e80c2f5b7 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Mon, 31 Dec 2007 19:01:49 +0100 Subject: behaves_like should take multiple names darcs-hash:20071231180149-cbc08-3d48eabe8b6833561719082c904768bfc993a73a.gz --- lib/bacon.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/bacon.rb') 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) -- cgit 1.4.1