Displaying 7 results from an estimated 7 matches for "selector_assertions".
2009 May 23
9
undefined method `assert_select'
I''m having trouble getting the specs to run for a plugin where I want to
fix a bug. (I''ve actually already found and fixed the bug, but I don''t
want to submit a fix without a test!) When I started the specs weren''t
running, but it may be that I''m using Rails 2.3.3 and the plugin has
been tested on 2.1 and earlier. I went through writing a spec for a
2007 May 21
9
Ordering in view specs using have_tag and with_tag
When writing view specs is there any way to test not only for the
presence of tags (have_tag) and nested tags (with_tag), but also test
that they appear in a given order?
For example, consider the following:
it ''should display the login names, display names and email
address in alternating rows'' do
response.should have_tag(''div.odd>div'') do
2007 Mar 19
3
Assert_select
Hi all
This is my first post here. I ave been using Rails for a couple of
months, and am starting to put together a test suite. But I''m having a
problem with assert_select in my functional tests.
According to the documentation, it should be fine with two arguments -
a CSS selector and a string to test it against. But no matter what I
do I keep getting the exception:
wrong number of
2007 Nov 17
0
rake errors
...gt; profile_box, :uid =>
user.uid})
end
end
RAILS_ENV=production /usr/bin/rake actions:update_profiles --trace
(in /rails/chitown)
rake aborted!
undefined method `camelize'' for "top":String
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
assertions/selector_assertions.rb:525
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
assertions/selector_assertions.rb:524:in `each''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
assertions/selector_assertions.rb:524
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:i...
2007 Sep 25
2
Testing for particular CSS (i.e. display: none)
I have a page that hides elements using CSS display: none.
I don''t expect RSpec to test any changes made by Javascript; I just want to
test how the page loads initially: what is visible and what is not.
Can I test this in RSpec? Or do I need to use something like Selenium?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Jan 24
7
Differences between assert_tag and assert_select
...gexp.escape(new_phone_url))}, :content => /add new/i
# Fails
assert_select "a[onclick=?]",
Regexp.new(Regexp.escape(new_phone_url)), /add new/i
test_link_to_add_address_exists(NewPartyViewTest)
[/home/francois/src/config/../vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb:281:in
`assert_select'
test/functional/admin/parties_controller_test.rb:1518:in
`test_link_to_add_address_exists']:
Expected at least 1 elements, found 0.
<false> is not true.
There's probably something I'm not doing right, for sure.
#assert_select is supposed to be s...
2007 Jan 26
0
Problems with assert_select in integration tests
...xt}]"
end
post_via_redirect destination, params
assert_response :success
end
end
Here is the failure report:
1) Failure:
test_personal_account_creation(AccountCreationTest)
[/Users/nielsene/ruby-work/compinabox/config/../vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb:281:in
`assert_select''
test/integration/account_creation_test.rb:37:in `click_button''
test/integration/account_creation_test.rb:11:in
`test_personal_account_creation''
/Users/nielsene/ruby-work/compinabox/config/../vendor/rails/actionpack/lib/action_controller/integrati...