Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellnit committed Dec 16, 2024
1 parent 8f7d87b commit 7de52bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/services/spot/exporters/work_members_exporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
FileUtils.mkdir_p(destination)
end

context 'the fileset has a transcript' do
context 'the fileset has a transcript' do
let(:file_set) { instance_double(FileSet, original_file: file, transcript: transcript) }

describe '#files' do
it {is_expected.to match_array([file, transcript])}
it { is_expected.to match_array([file, transcript]) }

Check failure on line 34 in spec/services/spot/exporters/work_members_exporter_spec.rb

View workflow job for this annotation

GitHub Actions / Test summary

./spec/services/spot/exporters/work_members_exporter_spec.rb.Spot::Exporters::WorkMembersExporter the fileset has a transcript #files is expected to contain exactly #<InstanceDouble(Hydra::PCDM::File) (anonymous)> and #<InstanceDouble(Hydra::PCDM::File) (anonymous)>

expected a collection that can be converted to an array with `#to_ary` or `#to_a`, but got #<Spot::Exporters::WorkMembersExporter:0x000055e7757a1ce8 @solr_document=#<InstanceDouble(SolrDocument) (anonymous)>>
Raw output
Failure/Error: it { is_expected.to match_array([file, transcript]) }
  expected a collection that can be converted to an array with `#to_ary` or `#to_a`, but got #<Spot::Exporters::WorkMembersExporter:0x000055e7757a1ce8 @solr_document=#<InstanceDouble(SolrDocument) (anonymous)>>
./vendor/bundle/ruby/2.7.0/gems/rspec-support-3.12.1/lib/rspec/support.rb:108:in `block in <module:Support>'
./vendor/bundle/ruby/2.7.0/gems/rspec-support-3.12.1/lib/rspec/support.rb:117:in `notify_failure'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/fail_with.rb:35:in `fail_with'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb:40:in `handle_failure'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb:56:in `block in handle_matcher'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb:27:in `with_matcher'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb:48:in `handle_matcher'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/expectation_target.rb:65:in `to'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/expectation_target.rb:101:in `to'
./spec/services/spot/exporters/work_members_exporter_spec.rb:34:in `block (4 levels) in <top (required)>'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:263:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:263:in `block in run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:486:in `block in run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
./vendor/bundle/ruby/2.7.0/gems/rspec-rails-5.1.2/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
./vendor/bundle/ruby/2.7.0/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:486:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:468:in `with_around_example_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:259:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:646:in `block in run_examples'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:642:in `map'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:642:in `run_examples'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:607:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `map'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/configuration.rb:2070:in `with_suite_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:116:in `block in run_specs'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/reporter.rb:74:in `report'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:115:in `run_specs'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:89:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:71:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:45:in `invoke'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/exe/rspec:4:in `<top (required)>'
./vendor/bundle/ruby/2.7.0/bin/rspec:23:in `load'
./vendor/bundle/ruby/2.7.0/bin/rspec:23:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli.rb:492:in `exec'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli.rb:34:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli.rb:28:in `start'
/usr/local/bundle/gems/bundler-2.4.19/exe/bundle:37:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.4.19/exe/bundle:29:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'
end

describe '#export!' do
Expand All @@ -48,11 +48,11 @@
end
end

context 'the fileset does not have a transcript' do
context 'the fileset does not have a transcript' do
let(:file_set) { instance_double(FileSet, original_file: file) }

describe '#files' do
it {is_expected.to eq(file)}
it { is_expected.to eq(file) }

Check failure on line 55 in spec/services/spot/exporters/work_members_exporter_spec.rb

View workflow job for this annotation

GitHub Actions / Test summary

./spec/services/spot/exporters/work_members_exporter_spec.rb.Spot::Exporters::WorkMembersExporter the fileset does not have a transcript #files is expected to eq #<InstanceDouble(Hydra::PCDM::File) (anonymous)>

expected: #<InstanceDouble(Hydra::PCDM::File) (anonymous)> got: #<Spot::Exporters::WorkMembersExporter:0x000055e77580af68 @solr_document=#<InstanceDouble(SolrDocument) (anonymous)>> (compared using ==) Diff: @@ -1,2 +1,3 @@ -#<InstanceDouble(Hydra::PCDM::File) (anonymous)> +#<Spot::Exporters::WorkMembersExporter:0x000055e77580af68 + @solr_document=#<InstanceDouble(SolrDocument) (anonymous)>>
Raw output
Failure/Error: it { is_expected.to eq(file) }

  expected: #<InstanceDouble(Hydra::PCDM::File) (anonymous)>
       got: #<Spot::Exporters::WorkMembersExporter:0x000055e77580af68 @solr_document=#<InstanceDouble(SolrDocument) (anonymous)>>

  (compared using ==)

  Diff:
  @@ -1,2 +1,3 @@
  -#<InstanceDouble(Hydra::PCDM::File) (anonymous)>
  +#<Spot::Exporters::WorkMembersExporter:0x000055e77580af68
  + @solr_document=#<InstanceDouble(SolrDocument) (anonymous)>>
./vendor/bundle/ruby/2.7.0/gems/rspec-support-3.12.1/lib/rspec/support.rb:108:in `block in <module:Support>'
./vendor/bundle/ruby/2.7.0/gems/rspec-support-3.12.1/lib/rspec/support.rb:117:in `notify_failure'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/fail_with.rb:35:in `fail_with'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb:38:in `handle_failure'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb:56:in `block in handle_matcher'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb:27:in `with_matcher'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb:48:in `handle_matcher'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/expectation_target.rb:65:in `to'
./vendor/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/expectation_target.rb:101:in `to'
./spec/services/spot/exporters/work_members_exporter_spec.rb:55:in `block (4 levels) in <top (required)>'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:263:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:263:in `block in run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:486:in `block in run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
./vendor/bundle/ruby/2.7.0/gems/rspec-rails-5.1.2/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
./vendor/bundle/ruby/2.7.0/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:486:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:468:in `with_around_example_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:259:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:646:in `block in run_examples'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:642:in `map'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:642:in `run_examples'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:607:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `map'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/configuration.rb:2070:in `with_suite_hooks'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:116:in `block in run_specs'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/reporter.rb:74:in `report'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:115:in `run_specs'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:89:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:71:in `run'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:45:in `invoke'
./vendor/bundle/ruby/2.7.0/gems/rspec-core-3.12.2/exe/rspec:4:in `<top (required)>'
./vendor/bundle/ruby/2.7.0/bin/rspec:23:in `load'
./vendor/bundle/ruby/2.7.0/bin/rspec:23:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli.rb:492:in `exec'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli.rb:34:in `dispatch'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/cli.rb:28:in `start'
/usr/local/bundle/gems/bundler-2.4.19/exe/bundle:37:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.4.19/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.4.19/exe/bundle:29:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'
end

describe '#export!' do
Expand Down

0 comments on commit 7de52bd

Please sign in to comment.