Sha256: 0322e52ea3d4f6e71b2a29219c0638876e5d485b8029a00a3da81a432967850c
Contents?: true
Size: 832 Bytes
Versions: 10
Compression:
Stored size: 832 Bytes
Contents
require 'spec_helper' include Capybara::DSL describe 'rspec matcher' do before(:each) do @black_box = 'black.png' @ref_path = LooksGood::Configuration.reference_image_path = File.join(spec_support_root, 'ref_path') create_images_for_web_page end after(:each) do config_clean_up remove_refs(@ref_path) end describe 'initializing and runnin looks_good' do it 'will pass if images matches reference' do create_square_image(@ref_path, 'black') black_element = element_for_spec("#black") black_element.should look_like("black.png") end it "will fail if images doesn't matches reference" do create_square_image(@ref_path, 'black') red_element = element_for_spec("#red") expect{red_element.should look_like(@black_box)}.to raise_error end end end
Version data entries
10 entries across 10 versions & 1 rubygems