Sha256: bdc736902aa7371d12112aaa9f26af6999e7f90e3a57d32aa15538e85287c736

Contents?: true

Size: 349 Bytes

Versions: 15

Compression:

Stored size: 349 Bytes

Contents

RSpec::Matchers.define :be_same_image_as do |expected|
  match do |actual|
    expected_path = File.expand_path('../../../data/' + expected, __FILE__)
    expected_file = File.binread(expected_path)
    actual_file = File.binread(actual)

    expected_file == actual_file
  end

  description do
    "be the same image as \"#{expected}\""
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
trollolo-0.3.1 spec/integration/support/custom_matchers.rb
trollolo-0.3.0 spec/integration/support/custom_matchers.rb
trollolo-0.2.0 spec/integration/support/custom_matchers.rb
trollolo-0.1.1 spec/integration/support/custom_matchers.rb
trollolo-0.1.0 spec/integration/support/custom_matchers.rb
trollolo-0.0.14 spec/integration/support/custom_matchers.rb
trollolo-0.0.12 spec/integration/support/custom_matchers.rb
trollolo-0.0.11 spec/integration/support/custom_matchers.rb
trollolo-0.0.10 spec/integration/support/custom_matchers.rb
trollolo-0.0.9 spec/integration/support/custom_matchers.rb
trollolo-0.0.8 spec/integration/support/custom_matchers.rb
trollolo-0.0.7 spec/integration/support/custom_matchers.rb
trollolo-0.0.6 spec/integration/support/custom_matchers.rb
trollolo-0.0.5 spec/integration/support/custom_matchers.rb
trollolo-0.0.4 spec/integration/support/custom_matchers.rb