Sha256: 875ce929950d6de1ed5ce4a75369edc8669d408947b3489a6711a77e7d87957b
Contents?: true
Size: 820 Bytes
Versions: 1
Compression:
Stored size: 820 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Relation::Keys, '#project' do subject { object.project(attributes) } let(:object) { described_class.coerce([ header ]) } let(:header) { [ id, name ] } let(:id) { [ :id ] } let(:name) { [ :name ] } context 'with attributes that do not change the keys' do let(:attributes) { [ id, name ] } it { should equal(object) } end context 'with attributes that change the keys' do let(:attributes) { [ id ] } it { should be_instance_of(described_class) } it { should == [ [ id ] ] } end context 'with attributes that clear the keys' do let(:attributes) { [] } it { should be_instance_of(described_class) } it { should be_empty } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.0 | spec/unit/axiom/relation/keys/project_spec.rb |