Sha256: 2d3fd7ead96bfd040d4e7e948d9fb9e0a50d19955810fe13332b125ad04008bb
Contents?: true
Size: 663 Bytes
Versions: 35
Compression:
Stored size: 663 Bytes
Contents
require 'spec_helper' RSpec.describe 'Lazy', type: :helper do subject { Torque::PostgreSQL::Attributes::Lazy } it 'is consider nil' do expect(subject.new(String, '')).to be_nil end it 'inspects as nil' do expect(subject.new(String, '').inspect).to be_eql('nil') end it 'compares to nil only' do expect(subject.new(String, '') == nil).to be_truthy expect(subject.new(String, '') == '').to be_falsey expect(subject.new(String, '') == 0).to be_falsey end it 'starts the object only on method call' do expect(subject.new(String, '').to_s).to be_a(String) expect(subject.new(String, '')).to respond_to(:chop) end end
Version data entries
35 entries across 35 versions & 1 rubygems