mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
add refute_selector as alias of assert_no_selector
This commit is contained in:
parent
743a117241
commit
316286d026
3 changed files with 10 additions and 1 deletions
|
@ -110,6 +110,8 @@ module Capybara
|
|||
return true
|
||||
end
|
||||
|
||||
alias_method :refute_selector, :assert_no_selector
|
||||
|
||||
##
|
||||
#
|
||||
# Checks if a given XPath expression is on the page or current node.
|
||||
|
|
|
@ -34,7 +34,8 @@ module Capybara
|
|||
:has_no_field?, :has_checked_field?, :has_unchecked_field?,
|
||||
:has_no_table?, :has_table?, :unselect, :has_select?, :has_no_select?,
|
||||
:has_selector?, :has_no_selector?, :click_on, :has_no_checked_field?,
|
||||
:has_no_unchecked_field?, :query, :assert_selector, :assert_no_selector
|
||||
:has_no_unchecked_field?, :query, :assert_selector, :assert_no_selector,
|
||||
:refute_selector
|
||||
]
|
||||
SESSION_METHODS = [
|
||||
:body, :html, :source, :current_url, :current_host, :current_path,
|
||||
|
|
|
@ -70,6 +70,12 @@ Capybara::SpecHelper.spec '#assert_selector' do
|
|||
end
|
||||
end
|
||||
|
||||
Capybara::SpecHelper.spec '#refute_selector' do
|
||||
it "should be an alias of #assert_no_selector" do
|
||||
Capybara::Node::Matchers.instance_method(:refute_selector).should == Capybara::Node::Matchers.instance_method(:assert_no_selector)
|
||||
end
|
||||
end
|
||||
|
||||
Capybara::SpecHelper.spec '#assert_no_selector' do
|
||||
before do
|
||||
@session.visit('/with_html')
|
||||
|
|
Loading…
Add table
Reference in a new issue