test/isbn_spec.rb in isbn-2.0.10 vs test/isbn_spec.rb in isbn-2.0.11
- old
+ new
@@ -72,9 +72,11 @@
ISBN.valid?("3-540-49698-x").must_equal true
ISBN.valid?(nil).must_equal false
end
it "should get isbn from source string" do
+ ISBN.from_string("ISBN:9-7883-7659-303-6\nmore of content").must_equal "9-7883-7659-303-6"
+ ISBN.from_string("ISBN:97-908-7939-278-8\nmore of content").must_equal "97-908-7939-278-8"
ISBN.from_string("ISBN:978-83-7659-303-6\nmore of content").must_equal "978-83-7659-303-6"
ISBN.from_string("ISBN-13 978-3-540-49698-4 and more content").must_equal "978-3-540-49698-4"
ISBN.from_string("ISBN-10 3-921099-34-X and more content").must_equal "3-921099-34-X"
ISBN.from_string("ISBN-10 3-921099-34- x and more content").must_equal "3-921099-34-x"
end