spec/lib/azeroth/resource_builder_spec.rb in azeroth-0.2.0 vs spec/lib/azeroth/resource_builder_spec.rb in azeroth-0.3.0

- old
+ new

@@ -9,11 +9,11 @@ let(:builder) { Sinclair.new(klass) } let(:klass) { Class.new(ResourceBuilderController) } before do resource_builder.append - 10.times { Document.create } + create_list(:document, 10) end describe '#append' do it 'adds the listing method' do expect { builder.build } @@ -27,10 +27,10 @@ .to(true) end describe 'after the build' do let(:controller) { klass.new(document_id: document.id) } - let(:document) { Document.create } + let(:document) { create(:document) } before { builder.build } context 'when requesting the list of documents' do it 'returns the list of documents' do