I found the following worked for me:
# Check
find(:css, "#cityID[value="62"]").set(true)
# Uncheck
find(:css, "#cityID[value="62"]").set(false)
More Related Contents:
- undefined method `visit’ when using RSpec and Capybara in rails
- Why not use shared ActiveRecord connections for Rspec + Selenium?
- Why does adding “sleep 1” in an after hook cause this Rspec/Capybara test to pass?
- Reducing n+1 queries using the Bullet and RSpec gems
- How can I test the page title with Capybara 2.0?
- Suppress Ruby warnings when running specs
- How is spec/rails_helper.rb different from spec/spec_helper.rb? Do I need it?
- Controller spec unknown keyword: id
- How to set request headers in rspec request spec?
- Why is Rspec saying “Failure/Error: Unable to find matching line from backtrace”?
- Rspec and capybara, difference between visit and get methods, with regards to the current_path object
- How to redirect to a 404 in Rails?
- How to find the local port a rails instance is running on?
- query , can not select column count
- Can we call a Controller’s method from a view (as we call from helper ideally)?
- Using helpers in model: how do I include helper dependencies?
- Rails I18n validation deprecation warning
- To use self. or not.. in Rails
- How can I format the value shown in a Rails edit field?
- Protected and private methods in Rails
- Failed to build gem native extension — Rails install
- Rails: Overriding ActiveRecord association method
- Rails – render :action to target anchor tag?
- Can you Distribute a Ruby on Rails Application without Source?
- Is there a “phpmyadmin” for Ruby on Rails? [closed]
- Rails 2 to Rails 3 : using link_to instead of link_to_remote (including remote and update)
- Rails Model has_many with multiple foreign_keys
- How to do static content in Rails?
- Ruby 1.9.2 and Rails 3 cannot open rails console
- Configuring Warden for use in RSpec controller specs