Sha256: d00bda59494fa1236d9f0bc56de6cc6704b91a6746af24141e212b5ece6bb1d8

Contents?: true

Size: 1.45 KB

Versions: 4

Compression:

Stored size: 1.45 KB

Contents

require_relative '../../../test_helper'

class RemoteModelHelpersDummy
  include Troo::RemoteModelHelpers

  def initialize(hash)
    @hash = hash
  end
end

module Troo
  describe RemoteModelHelpersDummy do
    let(:described_class) { RemoteModelHelpersDummy }
    let(:resources) { [{}, {}] }

    describe '.with_collection' do
      subject { described_class.with_collection(resources) }

      it 'instantiates classes' do
        subject.first.must_be_instance_of(RemoteModelHelpersDummy)
      end

      it 'returns a collection of instantiated classes' do
        subject.size.must_equal(2)
      end
    end

    describe '.all' do
      subject { described_class.all }

      it 'returns the resource parameters' do
        subject.must_equal({})
      end
    end

    describe '.by_board_id' do
      subject { described_class.by_board_id }

      it 'returns the resource parameters' do
        subject.must_equal({})
      end
    end

    describe '.by_list_id' do
      subject { described_class.by_list_id }

      it 'returns the resource parameters' do
        subject.must_equal({})
      end
    end

    describe '.by_card_id' do
      subject { described_class.by_card_id }

      it 'returns the resource parameters' do
        subject.must_equal({})
      end
    end

    describe '.by_member_id' do
      subject { described_class.by_member_id }

      it 'returns the resource parameters' do
        subject.must_equal({})
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
troo-0.0.12 test/lib/troo/helpers/remote_model_helpers_test.rb
troo-0.0.11 test/lib/troo/helpers/remote_model_helpers_test.rb
troo-0.0.10 test/lib/troo/helpers/remote_model_helpers_test.rb
troo-0.0.9 test/lib/troo/helpers/remote_model_helpers_test.rb