Sha256: aeb263c9823210cde13ef7231b8e571f84383d25c65775d6698ea73e79920ab9

Contents?: true

Size: 487 Bytes

Versions: 2

Compression:

Stored size: 487 Bytes

Contents

shared_examples 'illustrations' do
  it 'renders the image' do
    expect(rendered).to have_xpath "//img[contains(@src, \"#{request.image.url}\")]"
  end

  it 'renders the video' do
    expect(rendered).to have_xpath "//div[@class='video']"
  end
end

shared_examples 'no illustrations' do
  it 'does not render an image' do
    expect(rendered).not_to have_xpath "//img"
  end

  it 'does not render a video' do
    expect(rendered).not_to have_xpath "//div[@class='video']"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tasuku-1.1.0 spec/views/tasuku/taskables/illustration_spec.rb
tasuku-1.0.1 spec/views/tasuku/taskables/illustration_spec.rb