lib/capybara/node/actions.rb in capybara-2.1.0.beta1 vs lib/capybara/node/actions.rb in capybara-2.1.0.rc1
- old
+ new
@@ -42,12 +42,12 @@
# Locate a text field or text area and fill it in with the given text
# The field can be found via its name, id or label text.
#
# page.fill_in 'Name', :with => 'Bob'
#
- # @param [String] locator Which field to fill in
- # @param [Hash{:with => String}] The value to fill in
+ # @param [String] locator Which field to fill in
+ # @param [Hash{:with => String}] options The value to fill in
#
def fill_in(locator, options={})
raise "Must pass a hash containing 'with'" if not options.is_a?(Hash) or not options.has_key?(:with)
with = options.delete(:with)
find(:fillable_field, locator, options).set(with)
@@ -98,12 +98,12 @@
# box is a multiple select, +select+ can be called multiple times to select more than
# one option. The select box can be found via its name, id or label text.
#
# page.select 'March', :from => 'Month'
#
- # @param [String] value Which option to select
- # @param [Hash{:from => String}] The id, name or label of the select box
+ # @param [String] value Which option to select
+ # @param [Hash{:from => String}] options The id, name or label of the select box
#
def select(value, options={})
if options.has_key?(:from)
from = options.delete(:from)
find(:select, from, options).find(:option, value, options).select_option
@@ -118,11 +118,11 @@
# box is a multiple select, +unselect+ can be called multiple times to unselect more than
# one option. The select box can be found via its name, id or label text.
#
# page.unselect 'March', :from => 'Month'
#
- # @param [String] value Which option to unselect
- # @param [Hash{:from => String}] The id, name or label of the select box
+ # @param [String] value Which option to unselect
+ # @param [Hash{:from => String}] options The id, name or label of the select box
#
def unselect(value, options={})
if options.has_key?(:from)
from = options.delete(:from)
find(:select, from, options).find(:option, value, options).unselect_option