Sha256: 3574a9fd6fc94c8bbda68a80f076244d5a18e9c6fc49e923c8ace337454881d9
Contents?: true
Size: 1.07 KB
Versions: 27
Compression:
Stored size: 1.07 KB
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 require 'spec_helper' describe TwitterCldr::Shared::Territory do let(:code) { '013' } let(:territory) { described_class.new(code) } let(:containment) { TwitterCldr::Shared::TerritoriesContainment } describe '#parents' do let(:parents) { %w[013 territory parents] } it 'delegates to TerritoriesContainment.parents' do expect(containment).to receive(:parents).with(code).and_return(parents) expect(territory.parents).to eq(parents) end end describe '#children' do let(:children) { %w[013 territory children] } it 'delegates to TerritoriesContainment.children' do expect(containment).to receive(:children).with(code).and_return(children) expect(territory.children).to eq(children) end end describe '#contains?' do let(:other_code) { 'RU' } it 'delegates to TerritoriesContainment.contains?' do expect(containment).to receive(:contains?).with(code, other_code) territory.contains?(other_code) end end end
Version data entries
27 entries across 27 versions & 1 rubygems