spec/unit/schema/resource_definition_spec.rb in syncano-4.0.0.alpha4 vs spec/unit/schema/resource_definition_spec.rb in syncano-4.0.0.pre
- old
+ new
@@ -1,35 +1,14 @@
require_relative '../../spec_helper'
describe Syncano::Schema::ResourceDefinition do
- let(:attribute) { double 'attribute' }
- let(:definition) do
- described_class.new(name, attributes: { 'koza' => raw_attribute },
- associations: {
- 'links' => [{ 'name' => 'koza', 'type' => 'detail' }]
- })
- end
- let(:name) { 'Kiszka' }
let(:raw_attribute) { double 'raw attribute' }
+ let(:attribute) { double 'attribute' }
before do
expect(Syncano::Schema::AttributeDefinition).to receive(:new).with('koza', raw_attribute).and_return(attribute)
end
- specify { expect(definition.attributes).to eq([attribute]) }
-
- specify { expect(definition.name).to eq(name) }
-
- it 'should delete colliding links' do
- expect(definition[:associations]['links']).to be_empty
- end
-
- describe 'top_level?' do
- context "when is top level" do
- pending "to be done"
- end
-
- context "when is not top level" do
- pending "to be done"
- end
+ it 'should create AttributeDefinition objects' do
+ expect(described_class.new(attributes: { 'koza' => raw_attribute }).attributes).to eq([attribute])
end
end
\ No newline at end of file