Sha256: 8e40b45d2b1915d022db49bf220b8f7dafbff558b6fbbb33e76c52719a988945
Contents?: true
Size: 600 Bytes
Versions: 5
Compression:
Stored size: 600 Bytes
Contents
describe ToFactory::Finders::Model do before do ToFactory.models = path end let(:finder) { ToFactory::Finders::Model.new } describe "#call" do let!(:user) { ToFactory::User.create! :name => "a user"} let!(:project) { ToFactory::Project.create! :name => "a project"} context "no match"do let(:path) { "./tmp/doesnt_exist" } it do expect(finder.call).to eq [] end end context "with a match" do let(:path) { "./spec/support/models" } it do expect(finder.call).to match_array [user, project] end end end end
Version data entries
5 entries across 5 versions & 1 rubygems