A title for your blog

Bundle Audit Spec

Bundler Audit scans your Gemfile.lock for gems with vulnerabilities and prints out advisory information. This snippet adds a spec that will fail if it finds a vulnerable gem.

bundler-audit

describe "Bundle Audit" do
  it "Bundler Audit passes" do
    stdout, _, status = Open3.capture3 'bundler-audit check --update'
    expect(status.success?).to be(true), stdout
  end
end

#rspec #ruby #snippets