Sha256: f4a1adfdafeeb8b9629e048a7442fdea8a1a55eef2b94b416735817f565bd773
Contents?: true
Size: 481 Bytes
Versions: 7
Compression:
Stored size: 481 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Function::Util, '.constant?' do subject { object.constant?(operand) } let(:object) { Optimizer::Function::Util } context 'with a constant' do let(:operand) { 1 } it { should be(true) } end context 'with an attribute' do let(:operand) { Attribute::Integer.new(:id) } it { should be(false) } end context 'with a nil' do let(:operand) { nil } it { should be(false) } end end
Version data entries
7 entries across 7 versions & 2 rubygems