Class: Object

Inherits:
BasicObject
Defined in:
lib/test/spec.rb

Overview

– Global helpers

Instance Method Summary collapse

Instance Method Details

#should(*args) ⇒ Object



687
688
689
690
691
692
693
694
695
696
# File 'lib/test/spec.rb', line 687

def should(*args)
  case args.size
  when 0
    Test::Spec::Should.new(self)
  when 1
    Test::Spec::Should.new(self).pass(args.first)
  else
    raise ArgumentError, "Object#should takes zero or one argument(s)."
  end
end