<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -192,15 +192,7 @@ module Daywalker
     def self.all_by_latitude_and_longitude(latitude, longitude)
       district = District.unique_by_latitude_and_longitude(latitude, longitude)
 
-      representative = unique_by_state_and_district(district.state, district.number)
-      junior_senator = unique_by_state_and_district(district.state, :junior_seat)
-      senior_senator = unique_by_state_and_district(district.state, :senior_seat)
-
-      {
-        :representative =&gt; representative,
-        :junior_senator =&gt; junior_senator,
-        :senior_senator =&gt; senior_senator
-      }
+      district.legislators
     end
 
     # Find all the legislators serving a specific address. This will include the district's Represenative, the Senior Senator, and the Junior Senator.</diff>
      <filename>lib/daywalker/legislator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -169,13 +169,16 @@ describe Daywalker::Legislator do
       @district = mock('district', :state =&gt; 'NY', :number =&gt; 21)
       Daywalker::District.stub!(:unique_by_latitude_and_longitude).with(42.731245, -73.684236).and_return(@district)
       
+
       @representative = mock('representative')
       @junior_senator = mock('junior senator')
       @senior_senator = mock('senior senator')
 
-      Daywalker::Legislator.stub!(:unique_by_state_and_district).with('NY', 21).and_return(@representative)
-      Daywalker::Legislator.stub!(:unique_by_state_and_district).with('NY', :junior_seat).and_return(@junior_senator)
-      Daywalker::Legislator.stub!(:unique_by_state_and_district).with('NY', :senior_seat).and_return(@senior_senator)
+      @district.stub!(:legislators).and_return({
+        :representative =&gt; @representative,
+        :junior_senator =&gt; @junior_senator,
+        :senior_senator =&gt; @senior_senator
+      })
     end
 
     it 'should find district by lat &amp; lng' do
@@ -184,20 +187,8 @@ describe Daywalker::Legislator do
       Daywalker::Legislator.all_by_latitude_and_longitude(42.731245, -73.684236)
     end
 
-    it 'should find the representative for the district' do
-      Daywalker::Legislator.should_receive(:unique_by_state_and_district).with('NY', 21).and_return(@representative)
-      
-      Daywalker::Legislator.all_by_latitude_and_longitude(42.731245, -73.684236)
-    end
-
-    it 'should find the junior senator for the state' do
-      Daywalker::Legislator.should_receive(:unique_by_state_and_district).with('NY', :junior_seat).and_return(@junior_senator)
-
-      Daywalker::Legislator.all_by_latitude_and_longitude(42.731245, -73.684236)
-    end
-
-    it 'should find the senior senator for the state' do
-      Daywalker::Legislator.should_receive(:unique_by_state_and_district).with('NY', :senior_seat).and_return(@senior_senator)
+    it 'should find the legislators for the district' do
+      @district.should_receive(:legislators)
 
       Daywalker::Legislator.all_by_latitude_and_longitude(42.731245, -73.684236)
     end</diff>
      <filename>spec/daywalker/legislator_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>da7623da908eb77d15ae02eef29ade40ee41cc99</id>
    </parent>
  </parents>
  <author>
    <name>Josh Nichols</name>
    <email>josh@technicalpickles.com</email>
  </author>
  <url>http://github.com/technicalpickles/daywalker/commit/cb40e3581140b415159411efb96d6da63e4a0ac3</url>
  <id>cb40e3581140b415159411efb96d6da63e4a0ac3</id>
  <committed-date>2009-02-16T23:19:27-08:00</committed-date>
  <authored-date>2009-02-16T23:19:27-08:00</authored-date>
  <message>Switched Legislator.all_by_latitude_and_longitude to use the new district.legislators.</message>
  <tree>572dedfd818916068ff331737699691d6ae9d94c</tree>
  <committer>
    <name>Josh Nichols</name>
    <email>josh@technicalpickles.com</email>
  </committer>
</commit>
