diff --git a/spec/fixed_fields/book_bad_008_spec.rb b/spec/fixed_fields/bad_008_spec.rb similarity index 51% rename from spec/fixed_fields/book_bad_008_spec.rb rename to spec/fixed_fields/bad_008_spec.rb index b14f46e..98bb435 100644 --- a/spec/fixed_fields/book_bad_008_spec.rb +++ b/spec/fixed_fields/bad_008_spec.rb @@ -3,7 +3,7 @@ require 'byebug' require 'marc_cleanup' -RSpec.describe 'test bad_008?' do +RSpec.describe 'bad_008?' do describe 'bad book format 008' do let(:marcfile) {"#{Dir.getwd}/spec/fixtures/fixed_fields/marc_with_bad_book_008.xml"} let(:reader) { MARC::XMLReader.new(marcfile, parser: 'magic') } @@ -12,4 +12,12 @@ expect(MarcCleanup.bad_008?(record_with_bad_008)).to eq true end end -end \ No newline at end of file + describe 'bad computer format 008' do + let(:marcfile) {"#{Dir.getwd}/spec/fixtures/fixed_fields/marc_with_bad_comp_008.xml"} + let(:reader) { MARC::XMLReader.new(marcfile, parser: 'magic') } + let(:record_with_bad_008) { reader.first } + it 'knows that a record with bad computer 008 is invalid' do + expect(MarcCleanup.bad_008?(record_with_bad_008)).to eq true + end + end +end diff --git a/spec/fixed_fields/comp_format_bad_008_spec.rb b/spec/fixed_fields/comp_format_bad_008_spec.rb deleted file mode 100644 index 470e61b..0000000 --- a/spec/fixed_fields/comp_format_bad_008_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'nokogiri' -require 'marc' -require 'byebug' -require 'marc_cleanup' - -RSpec.describe 'test bad_008?' do - describe 'bad computer format 008' do - let(:marcfile) {"#{Dir.getwd}/spec/fixtures/fixed_fields/marc_with_bad_008.xml"} - let(:reader) { MARC::XMLReader.new(marcfile, parser: 'magic') } - let(:record_with_bad_008) { reader.first } - it 'knows that a record with bad computer 008 is invalid' do - expect(MarcCleanup.bad_008?(record_with_bad_008)).to eq true - end - end -end \ No newline at end of file diff --git a/spec/fixtures/fixed_fields/marc_with_bad_008.xml b/spec/fixtures/fixed_fields/marc_with_bad_comp_008.xml similarity index 100% rename from spec/fixtures/fixed_fields/marc_with_bad_008.xml rename to spec/fixtures/fixed_fields/marc_with_bad_comp_008.xml