Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/minitest/bacon.rb
Instance Method Summary collapse
Instance Method Details
#shared(name, &block) ⇒ Object
163 164 165 166 167 168 169 |
# File 'lib/minitest/bacon.rb', line 163 def shared(name, &block) Minitest::Shared[name] = Module.new do |m| (class << m; self; end).send :define_method, :included do |cls| cls.instance_eval(&block) end end end |
#should(*args, &block) ⇒ Object
159 160 161 |
# File 'lib/minitest/bacon.rb', line 159 def should(*args, &block) Minitest::ValueMonad.new(self).be(*args, &block) end |
#true? ⇒ Boolean
155 156 157 |
# File 'lib/minitest/bacon.rb', line 155 def true? !!self end |