diff options
| author | mo khan <mo.khan@gmail.com> | 2020-03-31 22:43:47 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-03-31 22:43:47 -0600 |
| commit | 50385eca4f7fb3a48571a5763994d02369b1e120 (patch) | |
| tree | 9b8f016ef4dfb1f8ec2cbc260fcc692dded46214 /spec/unit/python | |
| parent | bf17dbb0b59c6ce230290566d04ad00554f1fa0c (diff) | |
Fix linter errors
Diffstat (limited to 'spec/unit/python')
| -rw-r--r-- | spec/unit/python/index_spec.rb | 7 | ||||
| -rw-r--r-- | spec/unit/python/pypi_spec.rb | 15 |
2 files changed, 7 insertions, 15 deletions
diff --git a/spec/unit/python/index_spec.rb b/spec/unit/python/index_spec.rb deleted file mode 100644 index cf774b8..0000000 --- a/spec/unit/python/index_spec.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Spandx::Python::Index do - subject { described_class.new(directory: directory) } - - let(:directory) { Dir.tmpdir } -end diff --git a/spec/unit/python/pypi_spec.rb b/spec/unit/python/pypi_spec.rb index 0cfc132..5eaad63 100644 --- a/spec/unit/python/pypi_spec.rb +++ b/spec/unit/python/pypi_spec.rb @@ -2,21 +2,20 @@ RSpec.describe Spandx::Python::PyPI do describe '#each' do - it 'parses each package correctly' do - items = [] + let(:items) { [] } + + before do VCR.use_cassette('pypi.org/simple', record: :new_episodes) do subject.each do |item| items.push(item) break if items.count == 100 end end - expect(items).not_to be_empty - items.each do |item| - puts item.inspect - expect(item[:name]).not_to be_nil - expect(item[:version]).not_to match('tar.gz') - end end + + specify { expect(items).not_to be_empty } + specify { items.each { |item| expect(item[:name]).not_to be_nil } } + specify { items.each { |item| expect(item[:version]).not_to match('tar.gz') } } end describe '#version_from' do |
