Sha256: 5a6a306bbf54be7860c758048ed28d50e968c50164a38b8441f1c827a483cace

Contents?: true

Size: 625 Bytes

Versions: 1

Compression:

Stored size: 625 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Attribute, '#rename' do
  subject { object.rename(name) }

  let(:described_class) { Attribute::Integer                       }
  let(:object)          { described_class.new(:id, :size => 1..10) }

  context 'when the new name is the same' do
    let(:name) { object.name }

    it { should equal(object) }
  end

  context 'when the new name is different' do
    let(:name) { :other_id }

    it { should be_kind_of(described_class) }

    it { should_not equal(object) }

    its(:name) { should equal(name) }

    its(:options) { should equal(object.options) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.4 spec/unit/veritas/attribute/rename_spec.rb