module Capybara::RSpecMatchers::CountSugar
Public Instance Methods
Source
# File lib/capybara/rspec/matchers/count_sugar.rb, line 20 def at_least(number) options[:minimum] = number self end
Source
# File lib/capybara/rspec/matchers/count_sugar.rb, line 15 def at_most(number) options[:maximum] = number self end
Source
# File lib/capybara/rspec/matchers/count_sugar.rb, line 10 def exactly(number) options[:count] = number self end
Source
# File lib/capybara/rspec/matchers/count_sugar.rb, line 8 def thrice; exactly(3); end
Source
# File lib/capybara/rspec/matchers/count_sugar.rb, line 7 def twice; exactly(2); end
Private Instance Methods
Source
# File lib/capybara/rspec/matchers/count_sugar.rb, line 31 def options # (@args.last.is_a?(Hash) ? @args : @args.push({})).last @kw_args end