Displaying 4 results from an estimated 4 matches for "should_contain".
2006 Oct 30
1
domain language?
...#39;t want to invent it the bass-ackwards way FIT does, with its
Java-style Action Fixture. That just gets me back to writing each line
as a custom function. Ruby solutions tend to be much more elegant than
that!
Now here''s my RSpec_Watir solution, to log into a site:
snapshot()
@browser.should_contain("login")
@browser.text_field(:id, ''login'').should_exist
@browser.ie.document.activeElement.name.should_equal(''login'')
# .because login field should have the focus
Those lines violate the Systir principles; they use parens () and
variables and state. T...
2012 Jun 14
3
response.should have_content("1 movie") does not seem to work for me
...sort of confused anyway, because in the RSpec book I''m told to use
contains("1 movie"), but this method is not found!
undefined method `contains'' for
#<Cucumber::Rails::World:0x007fb114028010> (NoMethodError)
After some searching on Google I got the hint to use should_contain("1
movie"), and this method seems to be available, but it doesn''t seem to
work. Anyways, I''m a bit confused now, because should_contain() was
claimed to be a Capybara thing, and not a Webrat thing, but I never read
something about Capybara in the book, only about Webrat....
2006 Nov 07
0
Wiki -> RSpec -> Watir
...t, in the right panel I put RSpec and Watir. So the code to
log into a website would look like this:
input_text ''login'', ''quentin''
input_text ''password'', ''test''
click_button ''commit''
@browser.should_contain(''Logged in successfully'')
@browser.should_contain(''greetings quentin'')
The point of RSpec is syntactic sugar, and I have not yet learned how much
sweeter I can make that. So far, I have learned how to use it to make
well-formed English sentences (modulo al...
2007 May 09
4
UI testing framework? (w/o selenium)
...;bbxBody"
page.should_have.at_most.6 :div, :class => "someClassName"
# page.[name_of_form]_form.
page.search_form.submit :name => "California" do
result.status.should_be :success
result.should_have :image, "logo.gif"
result.url.should_contain "some_page.html"
end
page.should_have :div, :class => ''something else''
page.should_have :div, :id => ''foo'', :class => ''bar''
page.should_have ''/div[1]/div[2]/td''
end
test ''/some/...