diff --git a/spec/fixtures/reference_images/plasma-bluetone.jpg b/spec/fixtures/reference_images/plasma-bluetone.jpg new file mode 100644 index 0000000..d525c46 Binary files /dev/null and b/spec/fixtures/reference_images/plasma-bluetone.jpg differ diff --git a/spec/fixtures/reference_images/plasma-greyscale.jpg b/spec/fixtures/reference_images/plasma-greyscale.jpg new file mode 100644 index 0000000..0433156 Binary files /dev/null and b/spec/fixtures/reference_images/plasma-greyscale.jpg differ diff --git a/spec/morandi_spec.rb b/spec/morandi_spec.rb index ebe2315..6c5433e 100644 --- a/spec/morandi_spec.rb +++ b/spec/morandi_spec.rb @@ -349,14 +349,42 @@ end describe 'when given an fx option' do - let(:options) { { 'fx' => 'sepia' } } + let(:options) { { 'fx' => filter_name } } - it 'applies filter to the image' do - process_image + context 'with sepia' do + let(:filter_name) { 'sepia' } - expect(File).to exist(file_out) - expect(processed_image_type).to eq('jpeg') - expect(file_out).to match_reference_image('plasma-sepia') + it 'applies filter to the image' do + process_image + + expect(File).to exist(file_out) + expect(processed_image_type).to eq('jpeg') + expect(file_out).to match_reference_image('plasma-sepia') + end + end + + context 'with bluetone' do + let(:filter_name) { 'bluetone' } + + it 'applies filter to the image' do + process_image + + expect(File).to exist(file_out) + expect(processed_image_type).to eq('jpeg') + expect(file_out).to match_reference_image('plasma-bluetone') + end + end + + context 'with greyscale' do + let(:filter_name) { 'greyscale' } + + it 'applies filter to the image' do + process_image + + expect(File).to exist(file_out) + expect(processed_image_type).to eq('jpeg') + expect(file_out).to match_reference_image('plasma-greyscale') + end end end