Sha256: 12260dd85d64ffa53611dd51e870c84717d8956fc7c1f31259cea62302e7198f
Contents?: true
Size: 697 Bytes
Versions: 23
Compression:
Stored size: 697 Bytes
Contents
require 'spec_helper' describe LinkThumbnailer::ImageComparators::Size do let(:image) { double(size: [20, 20]) } let(:instance) { described_class.new(image) } describe '#call' do let(:other) { double(size: other_size) } let(:action) { instance.call(other) } context 'when other has a better image' do let(:other_size) { [10, 10] } it { expect(action).to eq(-1) } end context 'when other has an identical image' do let(:other_size) { [20, 20] } it { expect(action).to eq(0) } end context 'when other has a weaker image' do let(:other_size) { [30, 30] } it { expect(action).to eq(1) } end end end
Version data entries
23 entries across 23 versions & 1 rubygems