Permalink
Browse files

Merge pull request #1033 from tricknotes/fix-method-comments

Fix method comments
  • Loading branch information...
2 parents 1232a91 + 30d5ccc commit ca0fbb2ae094451ec0e1b5ef9b1de2164af7f8d9 @jnicklas jnicklas committed Mar 29, 2013
View
@@ -37,7 +37,7 @@ def to_regexp(text)
# `Capybara.asset_host`.
#
# @param [String] html HTML code to inject into
- # @param [String] The modified HTML code
+ # @return [String] The modified HTML code
#
def inject_asset_host(html)
if Capybara.asset_host
@@ -44,8 +44,8 @@ def click_button(locator, options={})
#
# 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)
@@ -100,8 +100,8 @@ def uncheck(locator, options={})
#
# 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)
@@ -120,8 +120,8 @@ def select(value, options={})
#
# 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)
@@ -49,9 +49,8 @@ def native
# ignored. This behaviour can be overridden by passing `:all` to this
# method.
#
- # @param [:all, :visible] Whether to return only visible or all text
- #
- # @return [String] The text of the element
+ # @param [:all, :visible] type Whether to return only visible or all text
+ # @return [String] The text of the element
#
def text(type=nil)
type ||= :all unless Capybara.ignore_hidden_elements or Capybara.visible_text_only
@@ -137,7 +137,7 @@ def all(*args)
# @overload first([kind], locator, options)
# @param [:css, :xpath] kind The type of selector
# @param [String] locator The selector
- # @param [Hash] options Additional options; see {all}
+ # @param [Hash] options Additional options; see {#all}
# @return [Capybara::Element] The found element or nil
#
def first(*args)
@@ -28,12 +28,12 @@ module Matchers
# page.has_selector?(:xpath, XPath.descendant(:p))
#
# @param (see Capybara::Node::Finders#all)
- # @param options a customizable set of options
- # @option options [Integer] :count (nil) Number of times the text should occur
- # @option options [Integer] :minimum (nil) Minimum number of times the text should occur
- # @option options [Integer] :maximum (nil) Maximum number of times the text should occur
- # @option options [Range] :between (nil) Range of times that should contain number of times text occurs
- # @return [Boolean] If the expression exists
+ # @param args
+ # @option args [Integer] :count (nil) Number of times the text should occur
+ # @option args [Integer] :minimum (nil) Minimum number of times the text should occur
+ # @option args [Integer] :maximum (nil) Maximum number of times the text should occur
+ # @option args [Range] :between (nil) Range of times that should contain number of times text occurs
+ # @return [Boolean] If the expression exists
#
def has_selector?(*args)
assert_selector(*args)
@@ -36,8 +36,8 @@ def text(type=nil)
#
# element[:title] # => HTML title attribute
#
- # @param [Symbol] attribute The attribute to retrieve
- # @return [String] The value of the attribute
+ # @param [Symbol] name The attribute name to retrieve
+ # @return [String] The value of the attribute
#
def [](name)
attr_name = name.to_s
View
@@ -325,7 +325,7 @@ def save_page(path=nil)
#
# Save a snapshot of the page and open it in a browser for inspection
#
- # @param [String] path The path to where it should be saved [optional]
+ # @param [String] file_name The path to where it should be saved [optional]
#
def save_and_open_page(file_name=nil)
require "launchy"

0 comments on commit ca0fbb2

Please sign in to comment.