Sha256: 8007a81bf4fb40d4f8aa12488ef0e73cb76a011cbb6d3f96191b7f767ceeafa0

Contents?: true

Size: 565 Bytes

Versions: 1

Compression:

Stored size: 565 Bytes

Contents

require 'spec_helper'

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

  let(:klass)  { Attribute::Integer             }
  let(:object) { klass.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(klass) }

    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.2 spec/unit/veritas/attribute/rename_spec.rb