Sha256: f94bccee6fb5b180ef1db3aca7190c52689565e330f26d1c06280d62fa402588
Contents?: true
Size: 760 Bytes
Versions: 8
Compression:
Stored size: 760 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe LittleWeasel::Metadata::MetadataObserverable, type: :module do MetadataObserverable = described_class subject do Class.new do include MetadataObserverable end.new end describe '#observe?' do it 'returns false by default' do expect(subject.observe?).to be false end end describe '#update' do it 'raises an error if not overridden' do expect { subject.update :action, args: :args }.to raise_error LittleWeasel::Errors::MustOverrideError end end describe '#actions_whitelist' do it 'returns an Array with :init and :refresh Symbols by default' do expect(subject.actions_whitelist).to eq %i[init refresh] end end end
Version data entries
8 entries across 8 versions & 1 rubygems