
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
capybara-restore_state
Advanced tools
= capybara-restore_state
capybara-restore_state offers the ability to execute a block where the initial capybara state on entering the block is returned after the block is executed. This makes it possible to test things like clicking on the same button twice.
This only works for the rack-test driver, other drivers can use the back buttons provided by the browser.
= Installation
gem install capybara-restore_state
= Source Code
Source code is available on GitHub at https://github.com/jeremyevans/capybara-restore_state
= Examples
require 'capybara' require 'capybara/restore_state'
describe Capybara::RestoreState do include Rack::Test::Methods include Capybara::DSL include Capybara::RestoreState
def app
MyRackApp
end
it "should allow restoring of state" do
# Assume Submit button takes you /a
visit '/'
page.current_path # => '/'
restore_state do
page.current_path # => '/'
click_button 'Submit'
page.current_path # => '/a'
end
page.current_path # => '/'
click_button 'Submit'
page.current_path # => '/a'
end
end
= License
MIT
= Author
Jeremy Evans code@jeremyevans.net
FAQs
Unknown package
We found that capybara-restore_state 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.