Module: Capybara::RSpecMatchers::CountSugar
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/capybara/rspec/matchers/count_sugar.rb |
Instance Method Summary
Instance Method Details
#at_least(number)
[ GitHub ]# File 'lib/capybara/rspec/matchers/count_sugar.rb', line 20
def at_least(number) [:minimum] = number self end
#at_most(number)
[ GitHub ]# File 'lib/capybara/rspec/matchers/count_sugar.rb', line 15
def at_most(number) [:maximum] = number self end
#exactly(number)
[ GitHub ]# File 'lib/capybara/rspec/matchers/count_sugar.rb', line 10
def exactly(number) [:count] = number self end
#once
[ GitHub ]# File 'lib/capybara/rspec/matchers/count_sugar.rb', line 6
def once; exactly(1); end
#options (private)
[ GitHub ]# File 'lib/capybara/rspec/matchers/count_sugar.rb', line 31
def # (@args.last.is_a?(Hash) ? @args : @args.push({})).last @kw_args end
#thrice
[ GitHub ]# File 'lib/capybara/rspec/matchers/count_sugar.rb', line 8
def thrice; exactly(3); end
#times
[ GitHub ]# File 'lib/capybara/rspec/matchers/count_sugar.rb', line 25
def times self end
#twice
[ GitHub ]# File 'lib/capybara/rspec/matchers/count_sugar.rb', line 7
def twice; exactly(2); end