Sha256: 0fb4ac0b580868532996c63c01bbb4696fe7d70c41a8bbcd44f632e142b12bef
Contents?: true
Size: 818 Bytes
Versions: 9
Compression:
Stored size: 818 Bytes
Contents
require 'minitest_helper' module SlideHero describe Media do describe "initialization" do it "is initialized with a url" do media = Media.new("http://www.youtube.com/watch?v=dQw4w9WgXcQ", type: :video) media.url.must_equal "http://www.youtube.com/watch?v=dQw4w9WgXcQ" media.type.must_equal :video end end describe "video type" do it "compiles to html fragment" do media = Media.new("file.mp4", type: :video) media.compile.must_equal %{<video data-autoplay src="video/file.mp4"></video>} end end describe "audio type" do it "compiles to html fragment" do media = Media.new("audio.mp3", type: :audio) media.compile.must_equal %{<audio data-autoplay src="audio/audio.mp3"></audio>} end end end end
Version data entries
9 entries across 9 versions & 1 rubygems