Sha256: 13bfc1552a812f4b844e02eea967ed9f0e10a72a78233fd2fa43ed24cc13367e

Contents?: true

Size: 1006 Bytes

Versions: 8

Compression:

Stored size: 1006 Bytes

Contents

require 'spec_helper'
require 'approvals/reporters'
require 'approvals/utilities/scrubber'

describe Approvals::Reporters::HtmlImageReporter do

  subject { Approvals::Reporters::HtmlImageReporter.instance }

  it "creates the template" do
    scrubber = Approvals::Scrubber.new(subject.html("spec/fixtures/one.png", "spec/fixtures/two.png"))
    scrubber.to_s.should eq('<html><head><title>Approval</title></head><body><center><table style="text-align: center;" border="1"><tr><td><img src="file://{{current_dir}}/spec/fixtures/one.png"></td><td><img src="file://{{current_dir}}/spec/fixtures/two.png"></td></tr><tr><td>received</td><td>approved</td></tr></table></center></body></html>')
  end

  # verify "creates the appropriate command", :format => :html do
  #   reporter = Reporters::HtmlImageReporter.instance
  #   scrubber = Scrubber.new(reporter.html("spec/fixtures/one.png", "spec/fixtures/two.png"))
  #   scrubber.to_executable do |html|
  #     reporter.display(html)
  #   end
  # end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
approvals-0.0.12 spec/reporters/html_image_reporter_spec.rb
approvals-0.0.11 spec/reporters/html_image_reporter_spec.rb
approvals-0.0.10 spec/reporters/html_image_reporter_spec.rb
approvals-0.0.9 spec/reporters/html_image_reporter_spec.rb
approvals-0.0.8 spec/reporters/html_image_reporter_spec.rb
approvals-0.0.7 spec/reporters/html_image_reporter_spec.rb
approvals-0.0.6 spec/reporters/html_image_reporter_spec.rb
approvals-0.0.5 spec/reporters/html_image_reporter_spec.rb