Sha256: dfadd51a2a2f05abb60f76c73ada0d3a4a0d605dce2b686cd8214cd0a3054958

Contents?: true

Size: 394 Bytes

Versions: 3

Compression:

Stored size: 394 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Yardstick::OrderedSet, '#index' do
  subject { set.index(item) }

  let(:item) { double('item') }

  context 'when provided an included item' do
    let(:set) { described_class.new([item]) }

    it { should be(0) }
  end

  context 'when provided an excluded item' do
    let(:set) { described_class.new }

    it { should be_nil }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yardstick-0.9.9 spec/unit/yardstick/ordered_set/index_spec.rb
yardstick-0.9.8 spec/unit/yardstick/ordered_set/index_spec.rb
yardstick-0.9.7 spec/unit/yardstick/ordered_set/index_spec.rb