Commit fc06c0a

mo <mo.khan@gmail.com>
2018-05-11 22:15:33
find_all -> all
1 parent 5d69583
Changed files (2)
lib/del/repository.rb
@@ -16,7 +16,7 @@ module Del
       end
     end
 
-    def find_all
+    def all
       @lock.synchronize do
         @storage.map do |(_, value)|
           @mapper.map_from(value)
spec/repository_spec.rb
@@ -20,7 +20,7 @@ RSpec.describe Del::Repository do
     specify { expect(subject.find(SecureRandom.uuid)).to be_nil }
   end
 
-  describe "#find_all" do
+  describe "#all" do
     let(:del_attributes) { { name: 'Teren Delvon Jones' } }
     let(:ice_cube_attributes) { { name: "O'Shea Jackson Sr." } }
     let(:del) { instance_double(Del::User) }
@@ -32,7 +32,7 @@ RSpec.describe Del::Repository do
       allow(mapper).to receive(:map_from).with(del_attributes).and_return(del)
       allow(mapper).to receive(:map_from).with(ice_cube_attributes).and_return(cube)
 
-      expect(subject.find_all).to match_array([ del, cube ])
+      expect(subject.all).to match_array([ del, cube ])
     end
   end
 end