From 435b21678dd2c61132dfaebacbef66fdacde5f37 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Sat, 22 Sep 2018 21:06:03 +0100 Subject: [PATCH] Add tests for Authority#tagged --- spec/authority_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/authority_spec.rb b/spec/authority_spec.rb index 16d048d..aa79438 100644 --- a/spec/authority_spec.rb +++ b/spec/authority_spec.rb @@ -39,4 +39,19 @@ describe UKPlanningScraper::Authority do end + describe '#tagged' do + let (:tagged_london) { described_class.tagged('london') } + + it 'returns all London authorities' do + expect(tagged_london.count).to eq(35) + end + + let (:tagged_londonboroughs) { described_class.tagged('londonboroughs') } + + it 'returns all London boroughs' do + expect(tagged_londonboroughs.count).to eq(32) + end + + end + end