File: rename_spec.rb

package info (click to toggle)
ruby-virtus 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 660 kB
  • sloc: ruby: 4,378; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

describe Virtus::Attribute, '#rename' do
  subject { object.rename(:bar) }

  let(:object) { described_class.build(String, :name => :foo, :strict => true) }
  let(:other)  { described_class.build(String, :name => :bar, :strict => true) }

  describe '#name' do
    subject { super().name }
    it { is_expected.to be(:bar) }
  end

  it { is_expected.not_to be(object) }
  it { is_expected.to be_strict }
end