Sha256: 63141cedebe35f650d95452c7b3d3c3fc9264b983cc4e69916cb553529bcbc9c
Contents?: true
Size: 960 Bytes
Versions: 5
Compression:
Stored size: 960 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Relation::Operation::Binary::EqualOperands, '#optimizable?' do subject { object.optimizable? } let(:described_class) { Class.new(Optimizer::Relation::Operation::Binary) } let(:relation) { mock('Relation', :left => left, :right => right) } let(:materialized) { mock('Materialized') } let(:not_materialized) { mock('Not Materialized') } let(:object) { described_class.new(relation) } before do described_class.class_eval { include superclass::EqualOperands } end context 'when left and right are equal' do let(:left) { not_materialized } let(:right) { not_materialized } it { should be(true) } end context 'when left and right are not equal' do let(:left) { not_materialized } let(:right) { materialized } it { should be(false) } end end
Version data entries
5 entries across 5 versions & 2 rubygems