spec/marc/spec/queries/query_spec.rb in ruby-marc-spec-0.1.2 vs spec/marc/spec/queries/query_spec.rb in ruby-marc-spec-0.1.3

- old
+ new

@@ -206,11 +206,22 @@ '040{$a=$c}' => [df040], '040{040$a=040$c}' => [df040] } verify_all(examples) end + + it 'can check for substrings in subfield values' do + df260 = marc_record['260'] + df260a = df260.subfields.find { |sf| sf.code == 'a' } + examples = { + '260{$a~\Diego}' => [df260], + '260$a{~\Diego}' => [df260a], + '260$a{~\Los\sAngeles}' => [], + '260{$a~\Los\sAngeles}' => [] + } + verify_all(examples) + end end end end - end end