lib/dfect/spec.rb in dfect-1.1.0 vs lib/dfect/spec.rb in dfect-2.0.0

- old
+ new

@@ -1,38 +1,31 @@ # RSpec emulation layer. -#-- -# Copyright protects this work. -# See LICENSE file for details. -#++ require 'dfect' -module Kernel - def describe *args, &block - Dfect.D args.join(' '), &block - end +module Dfect + alias describe D + alias context D + alias it D - alias context describe - alias it describe - def before what, &block meth = case what when :each then :< when :all then :<< else raise ArgumentError, what end - Dfect.send meth, &block + send meth, &block end def after what, &block meth = case what when :each then :> when :all then :>> else raise ArgumentError, what end - Dfect.send meth, &block + send meth, &block end end