Sha256: c1921cd7871a478084781dc9a6ee4457b09d8c56feb4f6ecc00294b7a4730d01
Contents?: true
Size: 1.48 KB
Versions: 13
Compression:
Stored size: 1.48 KB
Contents
# frozen_string_literal: true require 'test_helper' module Vedeu describe Repositories do let(:described) { Vedeu::Repositories } describe '.all' do # let(:expected) { # [ # Vedeu::Cursors::Repository.new, # Vedeu::Buffers::Repository.new, # Vedeu::Groups::Repository.new, # Vedeu::Interfaces::Repository.new, # ] # } subject { described.all } # it { subject.must_equal(expected) } end describe '.register' do subject { described.register(klass) } context 'when the klass is nil' do let(:klass) {} it { subject.must_equal(nil) } end context 'when the klass is a repository class' do let(:klass) { Vedeu::Buffers::Repository } it { subject.wont_be_empty } end end describe '.registered' do before { Vedeu.stubs(:log) described.reset! } subject { described.registered } # context 'when there is nothing registered' do # let(:expected) { [[], [], [], []] } # it { subject.must_equal(expected) } # end end describe '.repositories' do subject { described.repositories } it { Vedeu.must_respond_to(:repositories) } it { subject.must_equal(described) } end describe '.reset!' do subject { described.reset! } it { described.must_respond_to(:reset) } it { subject.must_equal(true) } end end # Repositories end # Vedeu
Version data entries
13 entries across 13 versions & 1 rubygems