require 'minitest_helper' module SlideHero describe List do it "takes a block of items to list" do list = List.new do point "A thing" point "another" end assert_dom_match(list.compile, '') end it "returns an ordered list" do list = List.new(:ordered) do point "A thing" point "another" end assert_dom_match(list.compile, '
  1. A thing
  2. another
') end it "supports animations" do list = List.new do point "animated!", animation: true end assert_dom_match(list.compile, '') end it "supports specific animations" do supported_animations = %w{grow shrink roll-in fade-out highlight-red highlight-green highlight-blue} supported_animations.each do |animation| list = List.new do point "all the animations!", animation: animation end assert_dom_match list.compile, '' end end end end