spec/prawn/svg/attributes/transform_spec.rb in prawn-svg-0.35.1 vs spec/prawn/svg/attributes/transform_spec.rb in prawn-svg-0.36.0

- old
+ new

@@ -18,11 +18,12 @@ context 'when a non-identity matrix is requested' do let(:transform) { 'translate(-5.5)' } it 'passes the transform and executes the returned matrix' do - expect(element).to receive(:parse_transform_attribute).with(transform).and_return([1, 2, 3, 4, 5, 6]) + expect(element).to receive(:parse_transform_attribute).with(transform) + expect(element).to receive(:matrix_for_pdf).and_return([1, 2, 3, 4, 5, 6]) expect(element).to receive(:add_call_and_enter).with('transformation_matrix', 1, 2, 3, 4, 5, 6) element.attributes['transform'] = transform subject end @@ -30,20 +31,22 @@ context 'when an identity matrix is requested' do let(:transform) { 'translate(0)' } it 'does not execute any commands' do - expect(element).to receive(:parse_transform_attribute).with(transform).and_return([1, 0, 0, 1, 0, 0]) + expect(element).to receive(:parse_transform_attribute).with(transform) + expect(element).to receive(:matrix_for_pdf).and_return([1, 0, 0, 1, 0, 0]) expect(element).not_to receive(:add_call_and_enter) element.attributes['transform'] = transform subject end end context 'when transform is blank' do it 'does nothing' do expect(element).not_to receive(:parse_transform_attribute) + expect(element).not_to receive(:matrix_for_pdf) expect(element).not_to receive(:add_call_and_enter) subject end end