Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/minitest/bacon.rb
Instance Method Summary collapse
Instance Method Details
#shared(name, &block) ⇒ Object
149 150 151 152 153 154 155 |
# File 'lib/minitest/bacon.rb', line 149 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
145 146 147 |
# File 'lib/minitest/bacon.rb', line 145 def should(*args, &block) Minitest::ValueMonad.new(self).be(*args, &block) end |
#true? ⇒ Boolean
141 142 143 |
# File 'lib/minitest/bacon.rb', line 141 def true? !!self end |