diff options
| author | mo khan <mo.khan@gmail.com> | 2020-01-09 09:04:48 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-01-15 15:03:07 -0700 |
| commit | a1161309d2cfe44ab1738723a6937ecd3680ea3a (patch) | |
| tree | 06e1681f2a607cf7322544ce23895d049d01f429 /spec/integration | |
| parent | f4f59927f87944a4d73be26416a7334521875f40 (diff) | |
Add spec to handle pipfile.lock files
Diffstat (limited to 'spec/integration')
| -rw-r--r-- | spec/integration/python/pipenv_spec.rb | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/spec/integration/python/pipenv_spec.rb b/spec/integration/python/pipenv_spec.rb new file mode 100644 index 0000000..7d02bf9 --- /dev/null +++ b/spec/integration/python/pipenv_spec.rb @@ -0,0 +1,49 @@ +require 'spec_helper' + +RSpec.describe "pipenv" do + context "when a project depends on a Pipfile.lock" do + let(:requirements) { "sentry-sdk>=0.7.7" } + + it 'produces a valid report' do + runner.add_file('Pipfile.lock') do + <<~RAW +{ + "_meta": { + "hash": { + "sha256": "d9b5cc506fc4feb9bf1ae7cadfd3737d5a0bd2b2d6c3fbcf0de3458bab34ad89" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.8" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "six": { + "hashes": [ + "sha256:1f1b7d42e254082a9db6279deae68afb421ceba6158efa6131de7b3003ee93fd", + "sha256:30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" + ], + "index": "pypi", + "version": "==1.13.0" + } + }, + "develop": {} +} + RAW + end + + 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 |
