Sha256: eb9ac4287adf8cb14ef7095ca5485b8eb91eb0cc31b3169685601bb6cd82434a

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'
include Capybara::DSL

describe 'Gatling' do

  before(:all) do
    @spec_support_root = spec_support_root
    @black_box = 'black.png'
    @red_box = 'red.png'
  end

  before(:each) do
    @ref_path = Gatling::Configuration.reference_image_path = File.join(spec_support_root, 'ref_path')
  end

  after(:each) do
    remove_refs(@ref_path)
  end

  describe 'Gatling, when no reference image exists' do

    it "will notify that no reference image exists and create a candidate image" do
      pending
      mock_element = mock
      mock_element.stub(:native).and_return(mock_element)

      expected_error = "The design reference #{@black_box} does not exist, #{@ref_path}/candidate/#{@black_box} " +
                       "is now available to be used as a reference. " +
                       "Copy candidate to root reference_image_path to use as reference"

      expect {Gatling.matches?(@black_box, mock_element)}.should raise_error(RuntimeError, expected_error)

      File.exists?(File.join(@ref_path, 'candidate', @black_box)).should be_true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gatling-1.1.2 spec/integration/gatling_integration_spec.rb