Sha256: 13b3053ca6f190de677a78282374b4bc25592e63bf9e8a10db45d0c69f9b6f33

Contents?: true

Size: 673 Bytes

Versions: 66

Compression:

Stored size: 673 Bytes

Contents

require 'curation_concerns/callbacks'

describe CurationConcerns::Callbacks do
  context 'when included in a class,' do
    before do
      class TestClass
        include CurationConcerns::Callbacks
      end
    end

    after do
      Object.send(:remove_const, :TestClass)
    end

    describe '.callback' do
      it 'returns an instance of Callbacks::Registry' do
        expect(TestClass.callback).to be_a CurationConcerns::Callbacks::Registry
      end
    end

    describe '#callback' do
      it 'is an instance method shortcut to the class method of the same name' do
        expect(TestClass.new.callback).to eq TestClass.callback
      end
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.7 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-2.0.0 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-2.0.0.rc2 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.6 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.5 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.4 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.3 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.2 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-2.0.0.rc1 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.1 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.0 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.7.0.beta1 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.6.3 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.6.2 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.6.1 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.6.0 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.5.0 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.4.0 spec/lib/curation_concerns/callbacks_spec.rb
curation_concerns-1.3.3 spec/lib/curation_concerns/callbacks_spec.rb