test/test_jorm.rb in jorm-0.0.1 vs test/test_jorm.rb in jorm-0.0.2

- old
+ new

@@ -8,26 +8,27 @@ unless normalized == expected fail "Expected #{expected}, got #{normalized}" end end - def assert_normazlied input - fail "#{input} is not normalized" unless Jorm.normalized? input + def assert_can_normazlie input + fail "#{input} can not normalized" unless Jorm.can_normalize? input end describe ".normalize_id" do it "normalize a dirty jav id to a clean one" do assert_normalize_to '0222-star404avi', 'star404' end end - describe ".normalized?" do - it "determines if a jav id is already normalized" do - assert_normazlied 'ebod096' + describe ".can_normalize?" do + it "determines if a jav id can be normalized" do + assert_can_normazlie 'ebod-096' end + end - it "takes untrimmed jav id as unnormalized" do - refute Jorm.normalized?("pgd438\n") - refute Jorm.normalized?(" pgd438") + describe ".already_normalized?" do + it "determines if a jav id is already normalized" do + assert Jorm.already_normalized? 'ebod096' end end end