Sha256: 09c4ef95f8a01cc685d4c55b6835199dfeef8c5f6b0dede28632a4f9b1b3beca
Contents?: true
Size: 683 Bytes
Versions: 1
Compression:
Stored size: 683 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Attribute, '#rename' do subject { object.rename(name) } let(:described_class) { Class.new(Attribute) } let(:object) { described_class.new(:name, required: false) } before do described_class.stub(type: Types::Object) end context 'when the new name is the same' do let(:name) { object.name } it { should be(object) } end context 'when the new name is different' do let(:name) { :other_name } it { should be_instance_of(described_class) } it { should_not be(object) } its(:name) { should be(name) } its(:required?) { should be(false) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.1 | spec/unit/axiom/attribute/rename_spec.rb |