require 'spec_helper' RSpec.describe "pipenv" do context "when a project depends on a Pipfile.lock" do let(:pipfile_lock_content) do JSON.pretty_generate({ "_meta": { "hash": { "sha256": "" }, "pipfile-spec": 6, "requires": { "python_version": "3.8" }, "sources": [ { "name": "pypi", "url": "https://pypi.org/simple", "verify_ssl": true } ] }, "default": { "six": { "hashes": [], "index": "pypi", "version": "==1.13.0" } }, "develop": {} }) end it 'produces a valid report' do runner.add_file('Pipfile.lock', pipfile_lock_content) report = runner.scan expect(report).not_to be_empty expect(report[:version]).to start_with('2') expect(report[:dependencies].map { |x| x[:name] }).to include("six") end end end