Class: DevelopWithPassion::Fakes::RSpec::Occurances
- Inherits:
-
Object
- Object
- DevelopWithPassion::Fakes::RSpec::Occurances
- Defined in:
- lib/core/occurances.rb
Class Method Summary collapse
- .at_least(times) ⇒ Object
- .at_most(times) ⇒ Object
- .exact(times) ⇒ Object
- .from_block(the_block) ⇒ Object
Class Method Details
.at_least(times) ⇒ Object
12 13 14 |
# File 'lib/core/occurances.rb', line 12 def at_least(times) return from_block(lambda { |occurences| return occurences >= times}) end |
.at_most(times) ⇒ Object
15 16 17 |
# File 'lib/core/occurances.rb', line 15 def at_most(times) return from_block(lambda { |occurences| return occurences <= times}) end |
.exact(times) ⇒ Object
9 10 11 |
# File 'lib/core/occurances.rb', line 9 def exact(times) return from_block(lambda{|occurances| return occurances == times}) end |
.from_block(the_block) ⇒ Object
6 7 8 |
# File 'lib/core/occurances.rb', line 6 def from_block(the_block) return BlockCriteria.new(the_block) end |