
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
technicalpickles-nice_assert_select
Advanced tools
= nice_assert_select
Tired of ugly assert_select calls?
assert_select "form[action=?][method=post]", sources_path do assert_select "input[type=text][name=?]", 'source[name]' assert_select "input[type=hidden][name=_method][value=put]" assert_select "input[type=submit]" end
How about some nice assert_selects?
assert_select form(:action => :post, :action => sources_path) do assert_select text_field(:name => 'source[name]') assert_select form_method_field(:put) assert_select submit_button end
nice_assert_select provides helpers for making the calls more rubyish and more readable. Currently, they are mostly limited to form related selectors that do attribute matching.
form text_field hidden_field password_field form_method_field (this is the hidden field Rails uses for determing what HTTP method to use, since browsers are generally limited to GET and POST) submit_button
It is by no means comprehensive, as it was extracted from a project which only needed these assert_selects.
== Installing
For Rails 2.1 and on, add this to your config/environment.rb:
config.gem 'technicalpickles-nice_assert_select', :lib => 'nice_assert_select', :source => 'http://gems.github.com'
== COPYRIGHT
Copyright (c) 2009 Josh Nichols. See LICENSE for details.
FAQs
Unknown package
We found that technicalpickles-nice_assert_select demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.