Sha256: 019ff8f4fadbb0e296b81ebe1272efe958699911e7ae544118cbf7a6f893ce48

Contents?: true

Size: 1023 Bytes

Versions: 7

Compression:

Stored size: 1023 Bytes

Contents

require 'test_helper'

module Vedeu

  module DSL

    class ModelTestClass

      include Vedeu::DSL::Presentation

      def initialize(model, client = nil)
        @model  = model
        @client = client
      end

      protected

      attr_reader :model

    end # ModelTestClass

  end # DSL

  describe Model do
    let(:model_instance) { ModelTestClass.new(attributes) }
    let(:attributes) {
      {
        name: 'hydrogen'
      }
    }

    describe '#repository' do
      it { model_instance.must_respond_to(:repository) }
    end

    describe '#repository=' do
      it { model_instance.must_respond_to(:repository=) }
    end

    describe '#deputy' do
      subject { model_instance.deputy }

      it 'returns the DSL instance' do
        subject.must_be_instance_of(DSL::ModelTestClass)
      end
    end

    describe '#store' do
      subject { model_instance.store }

      it 'returns the model' do
        subject.must_be_instance_of(ModelTestClass)
      end
    end

  end # Model

end # Vedeu

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vedeu-0.4.40 test/lib/vedeu/repositories/model_test.rb
vedeu-0.4.39 test/lib/vedeu/repositories/model_test.rb
vedeu-0.4.38 test/lib/vedeu/repositories/model_test.rb
vedeu-0.4.37 test/lib/vedeu/repositories/model_test.rb
vedeu-0.4.36 test/lib/vedeu/repositories/model_test.rb
vedeu-0.4.35 test/lib/vedeu/repositories/model_test.rb
vedeu-0.4.34 test/lib/vedeu/repositories/model_test.rb