Class: Proc
Instance Method Summary collapse
Instance Method Details
#change? ⇒ Boolean
190 191 192 193 194 195 |
# File 'lib/minitest/bacon.rb', line 190 def change? before = yield call after = yield before != after end |
#raise?(*exceptions) ⇒ Boolean
173 174 175 176 177 178 179 180 |
# File 'lib/minitest/bacon.rb', line 173 def raise?(*exceptions) exceptions = [RuntimeError] if exceptions.empty? call rescue *exceptions => e e else false end |
#throw?(sym) ⇒ Boolean
182 183 184 185 186 187 188 |
# File 'lib/minitest/bacon.rb', line 182 def throw?(sym) not catch(sym) { call return false } return true end |