Sha256: 8dd4772dc08c4279844b4f43118defbb327cadd06f251e40308e34be4c570541

Contents?: true

Size: 769 Bytes

Versions: 2

Compression:

Stored size: 769 Bytes

Contents

require 'spec_helper'
module Alf
  module Viewpoint
    describe Metadata, "all_members" do

      let(:metadata) do 
        @base  = base  = viewpoint{ native :base }
        @user  = user  = viewpoint{ expects(base); native :user }
        @util1 = util1 = viewpoint{ expects(base);  depends(:user, user) }
        @util2 = util2 = viewpoint{ expects(util1); depends(:user, user) }
        @term  = viewpoint{ expects(util2) }
        @term.metadata
      end

      before do
        metadata
      end

      context 'on base' do
        subject{ @base.metadata.all_members }

        it{ should eq([:base]) }
      end

      context 'on user' do
        subject{ @user.metadata.all_members }

        it{ should eq([:base, :user]) }
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-viewpoint/metadata/test_all_members.rb
alf-core-0.14.0 spec/unit/alf-viewpoint/metadata/test_all_members.rb