From db32694ac9fb4cdf005ee3696c3fd7d221bc6805 Mon Sep 17 00:00:00 2001 From: ryo katsuma Date: Sun, 22 Sep 2013 00:27:46 +0900 Subject: [PATCH] Add `context` method as `describe` alias --- lib/motion/spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/motion/spec.rb b/lib/motion/spec.rb index d4411c0e..23e45c0b 100644 --- a/lib/motion/spec.rb +++ b/lib/motion/spec.rb @@ -586,6 +586,8 @@ module Bacon def raise?(*args, &block); block.raise?(*args); end def throw?(*args, &block); block.throw?(*args); end def change?(*args, &block); block.change?(*args); end + + alias_method :context, :describe end end @@ -643,6 +645,8 @@ module Kernel private def describe(*args, &block) Bacon::Context.new(args.join(' '), &block) end def shared(name, &block) Bacon::Shared[name] = block end + + alias_method :context, :describe end class Should