FROM ruby:2.2.6
RUN git clone https://github.com/dicom/ruby-dicom.git /usr/dicom/ruby-dicom
WORKDIR /usr/dicom/ruby-dicom
RUN bundle install
RUN bundle exec rake spec
CMD ["/bin/bash"]
➜ ruby-dicom git:(master) ✗ docker build -t ruby_dicom_test .
Sending build context to Docker daemon 9.95 MB
Step 1/6 : FROM ruby:2.2.6
---> 7cb10de60b6b
Step 2/6 : RUN git clone https://github.com/dicom/ruby-dicom.git /usr/dicom/ruby-dicom
---> Using cache
---> 83a938ca8131
Step 3/6 : WORKDIR /usr/dicom/ruby-dicom
---> Using cache
---> c32b8f486924
Step 4/6 : RUN bundle install
---> Using cache
---> 9c85e18ebd1e
Step 5/6 : RUN bundle exec rake spec
---> Running in 0debad06185e
/usr/local/bin/ruby -I/usr/local/bundle/gems/rspec-core-3.5.4/lib:/usr/local/bundle/gems/rspec-support-3.5.0/lib /usr/local/bundle/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*/\*_spec.rb -c -f progress -r ./spec/spec_helper.rb
........................................................................................................................................................DICOM
DICOM
DICOM
F....................................................................................................................................F.............................................................................DICOM
DICOM
DICOM
DICOM
F.........................................................................................................................................................................................................................................................................F......F...............F............................................................................................................FFF.................FFF.....................................................................................................................................
Failures:
1) DICOM::DObject::parse should register one or more errors/warnings/debugs in the log when failing to successfully parse a DICOM string
Failure/Error: DICOM.logger.expects(:warn).at_least_once
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected at least once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x3b97870>.warn(any_parameters)
satisfied expectations:
- expected at least once, invoked once: #<DICOM::Logging::ClassMethods::ProxyLogger:0x3b97870>.error(any_parameters)
- expected at least once, invoked once: #<DICOM::Logging::ClassMethods::ProxyLogger:0x3b97870>.debug(any_parameters)
# ./spec/dicom/d_object_spec.rb:87:in `block (3 levels) in <module:DICOM>'
2) DICOM::load should return an array containing the expected DObject instances when given a directory (with sub-directories) which contains multiple DICOM files
Failure/Error: expect(ary).to eql [DObject.read(DCM_ISO8859_1), DObject.read(DCM_AT_NO_VALUE)]
expected: [{"File Meta Information Group Length"=>210, "File Meta Information Version"=>nil, "Media Storage SOP..., "Bits Stored"=>16, "High Bit"=>15, "Pixel Representation"=>0, "Grid Frame Offset Vector"=>"0.00"}]
got: [{"File Meta Information Group Length"=>210, "File Meta Information Version"=>nil, "Media Storage SOP...me"=>"TEST", "Manufacturer's Model Name"=>"\u00D5nc\u00EAntr\u00E5 M\u00E6st\u00F8rPl\u00E0\u00F1"}]
(compared using eql?)
Diff:
@@ -1,3 +1,3 @@
-[{"File Meta Information Group Length"=>210, "File Meta Information Version"=>nil, "Media Storage SOP Class UID"=>"1.2.840.10008.5.1.4.1.1.481.2", "Media Storage SOP Instance UID"=>"1.3.6.1.4.1.2452.6.164597922.1249989320.2326663826.3216872486", "Transfer Syntax UID"=>"1.2.840.10008.1.2.1", "Implementation Class UID"=>"1.2.250.1.59.3.0.3.3.1", "Implementation Version Name"=>"eFilm/efDICOM", "Source Application Entity Title"=>nil, "Group Length"=>166, "Specific Character Set"=>"ISO_IR 100", "SOP Class UID"=>"1.2.840.10008.5.1.4.1.1.481.2", "SOP Instance UID"=>"1.3.6.1.4.1.2452.6.164597922.1249989320.2326663826.3216872486", "Station Name"=>"TEST", "Manufacturer's Model Name"=>"\u00D5nc\u00EAntr\u00E5 M\u00E6st\u00F8rPl\u00E0\u00F1"},
- {"File Meta Information Group Length"=>210, "File Meta Information Version"=>nil, "Media Storage SOP Class UID"=>"1.2.840.10008.5.1.4.1.1.481.2", "Media Storage SOP Instance UID"=>"1.3.6.1.4.1.2452.6.164597922.1249989320.2326663826.3216872486", "Transfer Syntax UID"=>"1.2.840.10008.1.2.1", "Implementation Class UID"=>"1.2.250.1.59.3.0.3.3.1", "Implementation Version Name"=>"eFilm/efDICOM", "Source Application Entity Title"=>nil, "Group Length"=>12, "Specific Character Set"=>"ISO_IR 100", "Image Type"=>"ORIGINAL\\PRIMARY\\DOSE", "Instance Creation Date"=>"20080222", "Instance Creation Time"=>"105924", "SOP Class UID"=>"1.2.840.10008.5.1.4.1.1.481.2", "SOP Instance UID"=>"1.3.6.1.4.1.2452.6.164597922.1249989320.2326663826.3216872486", "Study Date"=>"20040707", "Content Date"=>"20080222", "Study Time"=>"093105.00", "Content Time"=>"105924", "Accession Number"=>nil, "Modality"=>"RTDOSE", "Manufacturer"=>"Nucletron", "Referring Physician's Name"=>nil, "Timezone Offset From UTC"=>"+0100", "Station Name"=>"TheStation", "Study Description"=>"Helax-TMS generated study", "Institutional Department Name"=>"DoseInc", "Manufacturer's Model Name"=>"Oncentra MasterPlan", "Samples per Pixel"=>1, "Photometric Interpretation"=>"MONOCHROME2", "Number of Frames"=>"126", "Frame Increment Pointer"=>nil, "Rows"=>6, "Columns"=>82, "Pixel Spacing"=>"2.000000\\2.000000", "Bits Allocated"=>16, "Bits Stored"=>16, "High Bit"=>15, "Pixel Representation"=>0, "Grid Frame Offset Vector"=>"0.00"}]
+[{"File Meta Information Group Length"=>210, "File Meta Information Version"=>nil, "Media Storage SOP Class UID"=>"1.2.840.10008.5.1.4.1.1.481.2", "Media Storage SOP Instance UID"=>"1.3.6.1.4.1.2452.6.164597922.1249989320.2326663826.3216872486", "Transfer Syntax UID"=>"1.2.840.10008.1.2.1", "Implementation Class UID"=>"1.2.250.1.59.3.0.3.3.1", "Implementation Version Name"=>"eFilm/efDICOM", "Source Application Entity Title"=>nil, "Group Length"=>12, "Specific Character Set"=>"ISO_IR 100", "Image Type"=>"ORIGINAL\\PRIMARY\\DOSE", "Instance Creation Date"=>"20080222", "Instance Creation Time"=>"105924", "SOP Class UID"=>"1.2.840.10008.5.1.4.1.1.481.2", "SOP Instance UID"=>"1.3.6.1.4.1.2452.6.164597922.1249989320.2326663826.3216872486", "Study Date"=>"20040707", "Content Date"=>"20080222", "Study Time"=>"093105.00", "Content Time"=>"105924", "Accession Number"=>nil, "Modality"=>"RTDOSE", "Manufacturer"=>"Nucletron", "Referring Physician's Name"=>nil, "Timezone Offset From UTC"=>"+0100", "Station Name"=>"TheStation", "Study Description"=>"Helax-TMS generated study", "Institutional Department Name"=>"DoseInc", "Manufacturer's Model Name"=>"Oncentra MasterPlan", "Samples per Pixel"=>1, "Photometric Interpretation"=>"MONOCHROME2", "Number of Frames"=>"126", "Frame Increment Pointer"=>nil, "Rows"=>6, "Columns"=>82, "Pixel Spacing"=>"2.000000\\2.000000", "Bits Allocated"=>16, "Bits Stored"=>16, "High Bit"=>15, "Pixel Representation"=>0, "Grid Frame Offset Vector"=>"0.00"},
+ {"File Meta Information Group Length"=>210, "File Meta Information Version"=>nil, "Media Storage SOP Class UID"=>"1.2.840.10008.5.1.4.1.1.481.2", "Media Storage SOP Instance UID"=>"1.3.6.1.4.1.2452.6.164597922.1249989320.2326663826.3216872486", "Transfer Syntax UID"=>"1.2.840.10008.1.2.1", "Implementation Class UID"=>"1.2.250.1.59.3.0.3.3.1", "Implementation Version Name"=>"eFilm/efDICOM", "Source Application Entity Title"=>nil, "Group Length"=>166, "Specific Character Set"=>"ISO_IR 100", "SOP Class UID"=>"1.2.840.10008.5.1.4.1.1.481.2", "SOP Instance UID"=>"1.3.6.1.4.1.2452.6.164597922.1249989320.2326663826.3216872486", "Station Name"=>"TEST", "Manufacturer's Model Name"=>"\u00D5nc\u00EAntr\u00E5 M\u00E6st\u00F8rPl\u00E0\u00F1"}]
# ./spec/dicom/dicom_spec.rb:127:in `block (3 levels) in <module:DICOM>'
3) DICOM::DObject::read should log a warning when encountering duplicate elements
Failure/Error: DICOM.logger.expects(:warn).at_least_once
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected at least once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x40c2548>.warn(any_parameters)
satisfied expectations:
- allowed any number of times, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x40c2548>.error(any_parameters)
- allowed any number of times, invoked once: #<DICOM::Logging::ClassMethods::ProxyLogger:0x40c2548>.info(any_parameters)
- allowed any number of times, invoked once: #<DICOM::Logging::ClassMethods::ProxyLogger:0x40c2548>.debug(any_parameters)
# ./spec/dicom/duplicate_elements_spec.rb:47:in `block (3 levels) in <module:DICOM>'
4) With :mini_magick as image processor DICOM::ImageItem#image should log a warning when it fails to decompress compressed pixel data
Failure/Error: DICOM.logger.expects(:warn)
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x2dff2d0>.warn(any_parameters)
# ./spec/dicom/image_minimagick_spec.rb:22:in `block (4 levels) in <module:DICOM>'
5) With :rmagick as image processor DICOM::ImageItem#image should log a warning when it fails to decompress compressed pixel data
Failure/Error: DICOM.logger.expects(:warn)
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x2dff2d0>.warn(any_parameters)
# ./spec/dicom/image_rmagick_spec.rb:27:in `block (4 levels) in <module:DICOM>'
6) With :rmagick as image processor DICOM::ImageItem#images should decompress the JPEG2K encoded multiframe pixel data of this DICOM file and return the image objects in an array
Failure/Error: expect(images.length).to eql 8
expected: 8
got: 0
(compared using eql?)
# ./spec/dicom/image_rmagick_spec.rb:147:in `block (4 levels) in <module:DICOM>'
7) DICOM::Parent#delete should log a warning when the argument is not a string or integer
Failure/Error: DICOM.logger.expects(:warn).once
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x28e3e68>.warn(any_parameters)
# ./spec/dicom/parent_spec.rb:482:in `block (3 levels) in <module:DICOM>'
8) DICOM::Parent#delete should log a warning when the argument is not a valid tag
Failure/Error: DICOM.logger.expects(:warn).once
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x28e3e68>.warn(any_parameters)
# ./spec/dicom/parent_spec.rb:487:in `block (3 levels) in <module:DICOM>'
9) DICOM::Parent#delete should log a warning when the argument is a negative integer
Failure/Error: DICOM.logger.expects(:warn).once
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x28e3e68>.warn(any_parameters)
# ./spec/dicom/parent_spec.rb:492:in `block (3 levels) in <module:DICOM>'
10) DICOM::Parent#value should log a warning when the argument is not a string or integer
Failure/Error: DICOM.logger.expects(:warn).once
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x28e3e68>.warn(any_parameters)
# ./spec/dicom/parent_spec.rb:668:in `block (3 levels) in <module:DICOM>'
11) DICOM::Parent#value should log a warning when the argument is not a valid tag
Failure/Error: DICOM.logger.expects(:warn).once
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x28e3e68>.warn(any_parameters)
# ./spec/dicom/parent_spec.rb:673:in `block (3 levels) in <module:DICOM>'
12) DICOM::Parent#value should log a warning when the argument is a negative integer
Failure/Error: DICOM.logger.expects(:warn).once
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<DICOM::Logging::ClassMethods::ProxyLogger:0x28e3e68>.warn(any_parameters)
# ./spec/dicom/parent_spec.rb:678:in `block (3 levels) in <module:DICOM>'
Finished in 12.49 seconds (files took 1.19 seconds to load)
917 examples, 12 failures
Failed examples:
rspec ./spec/dicom/d_object_spec.rb:85 # DICOM::DObject::parse should register one or more errors/warnings/debugs in the log when failing to successfully parse a DICOM string
rspec ./spec/dicom/dicom_spec.rb:119 # DICOM::load should return an array containing the expected DObject instances when given a directory (with sub-directories) which contains multiple DICOM files
rspec ./spec/dicom/duplicate_elements_spec.rb:45 # DICOM::DObject::read should log a warning when encountering duplicate elements
rspec ./spec/dicom/image_minimagick_spec.rb:20 # With :mini_magick as image processor DICOM::ImageItem#image should log a warning when it fails to decompress compressed pixel data
rspec ./spec/dicom/image_rmagick_spec.rb:25 # With :rmagick as image processor DICOM::ImageItem#image should log a warning when it fails to decompress compressed pixel data
rspec ./spec/dicom/image_rmagick_spec.rb:143 # With :rmagick as image processor DICOM::ImageItem#images should decompress the JPEG2K encoded multiframe pixel data of this DICOM file and return the image objects in an array
rspec ./spec/dicom/parent_spec.rb:481 # DICOM::Parent#delete should log a warning when the argument is not a string or integer
rspec ./spec/dicom/parent_spec.rb:486 # DICOM::Parent#delete should log a warning when the argument is not a valid tag
rspec ./spec/dicom/parent_spec.rb:491 # DICOM::Parent#delete should log a warning when the argument is a negative integer
rspec ./spec/dicom/parent_spec.rb:667 # DICOM::Parent#value should log a warning when the argument is not a string or integer
rspec ./spec/dicom/parent_spec.rb:672 # DICOM::Parent#value should log a warning when the argument is not a valid tag
rspec ./spec/dicom/parent_spec.rb:677 # DICOM::Parent#value should log a warning when the argument is a negative integer
/usr/local/bin/ruby -I/usr/local/bundle/gems/rspec-core-3.5.4/lib:/usr/local/bundle/gems/rspec-support-3.5.0/lib /usr/local/bundle/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*/\*_spec.rb -c -f progress -r ./spec/spec_helper.rb failed
The command '/bin/sh -c bundle exec rake spec' returned a non-zero code: 1