Skip to content

Commit

Permalink
fix: set the correct processor when testing saving with various quali…
Browse files Browse the repository at this point in the history
…ty settings

Previously the test was performed on pixbuf twice instead of using the relevant processor
  • Loading branch information
knarewski committed Dec 12, 2024
1 parent 2883318 commit 0cb5c4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/morandi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -403,19 +403,19 @@

context 'with increasing quality settings' do
let!(:max_quality_file) do
Morandi.process(file_in, { 'quality' => 100 }, 'sample/out-100.jpg')
Morandi.process(file_in, { 'quality' => 100 }, 'sample/out-100.jpg', 'processor' => processor_name)
end

let(:max_quality_file_size) { File.size('sample/out-100.jpg') }

let!(:default_of_97_quality_file) do
Morandi.process(file_in, {}, 'sample/out-97.jpg')
Morandi.process(file_in, {}, 'sample/out-97.jpg', 'processor' => processor_name)
end

let(:default_of_97_quality_file_size) { File.size('sample/out-97.jpg') }

let!(:quality_of_40_file) do
Morandi.process(file_in, { 'quality' => 40 }, 'sample/out-40.jpg')
Morandi.process(file_in, { 'quality' => 40 }, 'sample/out-40.jpg', 'processor' => processor_name)
end

let(:quality_of_40_file_size) { File.size('sample/out-40.jpg') }
Expand Down

0 comments on commit 0cb5c4e

Please sign in to comment.