Sha256: d66b74e3ed8c4349dbbe350561808955e621bfb906aca8e80e7cacf42ced7561
Contents?: true
Size: 678 Bytes
Versions: 7
Compression:
Stored size: 678 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe SQL::Generator::Relation, '#name' do subject { object.name } let(:described_class) { Class.new(SQL::Generator::Relation) } let(:object) { described_class.new } context 'when name is nil' do it_should_behave_like 'an idempotent method' it { should be_nil } end context 'when name is set' do let(:name) { 'test' } before do # subclasses set @name, but nothing in this class # does does so simulate it being set object.instance_variable_set(:@name, name) end it_should_behave_like 'an idempotent method' it { should equal(name) } end end
Version data entries
7 entries across 7 versions & 2 rubygems