Sha256: 749dfa1fcfe87d8627797c9cd4c3c22e7818679f6af00b57ed81026eab792f1d
Contents?: true
Size: 1.15 KB
Versions: 12
Compression:
Stored size: 1.15 KB
Contents
RSpec.describe Card::Set::Abstract::Media do describe "#image_with_text" do let(:html_format) do Card[:yeti_skin].format_with_set(described_class, :html) end def text_with_image args={} html_format.text_with_image args end it "uses +image by default" do expect(text_with_image) .to have_tag :div, with: { class: "media" } do with_tag "img[src*='/files/']", with: { alt: "yeti skin+Image" } end end it "takes image card name as image" do expect(text_with_image(image: "yeti skin+image")) .to have_tag :div, with: { class: "media" } do with_tag "img[src*='/files/']", with: { alt: "yeti skin+Image" } end end it "takes image card object as image" do expect(text_with_image(image: Card[:yeti_skin_image])) .to have_tag :div, with: { class: "media" } do with_tag "img[src*='/files/']", with: { alt: "yeti skin+Image" } end end it "handles size argument" do expect(text_with_image(size: :small)) .to have_tag :div, with: { class: "media" } do with_tag "img[src*='small']" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems