New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

capybara-minitest

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capybara-minitest

  • 0.9.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Capybara::Minitest

Gem Version Dependency Status Build Status Code Climate Coverage Status Inline docs

If you're using Minitest::Test with the Capybara::DSL for your tests, this gem will allow you to do:

# With Capybara::Minitest::Assertions included
assert_has_text page, 'Squeak', 'optional message'

instead of:

# Without Capybara::Minitest
assert page.has_text?('Squeak'), 'optional message'

The assertions are dynamically generated from Capybara's RSpec matchers. You can optionally provide custom failure messages and the backtrace will be cleaned up for you.

You can see the full list of assertions (and refutations) in the auto-generated RDoc.

Install

# Gemfile
gem 'capybara-minitest'

Usage

require 'capybara/minitest/assertions'

class AcceptanceTest < Minitest::Test
  include Capybara::DSL
  include Capybara::Minitest::Assertions
end

Or, if you're using Rails:

require 'capybara/minitest/assertions'

class AcceptanceTest < ActionDispatch::IntegrationTest
  include Capybara::DSL
  include Capybara::Minitest::Assertions
end

Example

class RodentTest < Minitest::Test
  include Capybara::DSL
  include Capybara::Minitest::Assertions

  def test_squeak
    visit '/rodent'
    assert_has_text page, 'Squeak', 'optional message'
  end
end

FAQs

Package last updated on 22 Oct 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc