Sha256: a2fec1cac3c70d7d24ceb31f22f3a1c0a5c01a26f749c53bfeebbfab16726a09

Contents?: true

Size: 838 Bytes

Versions: 2

Compression:

Stored size: 838 Bytes

Contents

require 'spec_helper'
module Alf
  module Viewpoint
    describe Metadata, "#expects" do

      context 'on empty expectations' do
        let(:metadata){ Metadata.new }

        subject{ metadata.expects([1, 2]) }

        it 'sets expectations' do
          subject.expectations.should eq([1, 2])
        end
      end

      context 'on disjoint expectations' do
        let(:metadata){ Metadata.new([1, 2]) }

        subject{ metadata.expects([3, 4]) }

        it 'sets expectations' do
          subject.expectations.should eq([1, 2, 3, 4])
        end
      end

      context 'on overlapping expectations' do
        let(:metadata){ Metadata.new([1, 2]) }

        subject{ metadata.expects([1, 4]) }

        it 'sets expectations' do
          subject.expectations.should eq([1, 2, 4])
        end
      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_expects.rb
alf-core-0.14.0 spec/unit/alf-viewpoint/metadata/test_expects.rb