require 'spec_helper' require 'gnawrnip/step_screenshot' module Gnawrnip describe StepScreenshot do let(:template) { StepScreenshot } it 'exists failure step template' do expect(TurnipFormatter::Step::Failure.templates).to have_key template end describe '.build' do subject { template.build(data_list) } context 'has multiple data' do let(:data_list) do [ GnawrnipTest.image('aiueo'), GnawrnipTest.image('12345'), GnawrnipTest.image('abcde') ] end it 'should get image tag and source that base64 encoded' do data1 = Base64.strict_encode64('aiueo') data2 = Base64.strict_encode64('12345') data3 = Base64.strict_encode64('abcde') should include '