Permalink
Browse files

Revert "added specs to prevent duplicate keys in ATTRIBUTES constants…

… and sorted those lists. also got rid of a duplicate"

This reverts commit 6d18302.

NO LONGER NEEDED
  • Loading branch information...
1 parent 6d18302 commit d188d715222bd3ce348de10ac2587939dbd04d18 @yonkeltron committed Aug 22, 2011
Showing with 23 additions and 38 deletions.
  1. +7 −6 lib/federal_register/agency.rb
  2. +16 −16 lib/federal_register/article.rb
  3. +0 −8 spec/agency_spec.rb
  4. +0 −8 spec/article_spec.rb
@@ -1,13 +1,14 @@
class FederalRegister::Agency < FederalRegister::Base
ATTRIBUTES = [
- :description,
:id,
- :json_url,
- :logo,
:name,
- :recent_articles_url,
:short_name,
- :url
+ :url,
+ :description,
+ :url,
+ :recent_articles_url,
+ :logo,
+ :json_url
]
def self.all
@@ -26,4 +27,4 @@ def logo_url(size)
attributes["logo"]["#{size}_url"] || raise("size '#{size}' not a valid image size")
end
end
-end
+end
@@ -1,28 +1,28 @@
class FederalRegister::Article < FederalRegister::Base
ATTRIBUTES = [
+ :title,
+ :type,
:abstract,
- :abstract_html_url,
- :action,
+ :document_number,
+ :html_url,
+ :pdf_url,
+ :publication_date,
:agencies,
+ :full_text_xml_url,
+ :abstract_html_url,
:body_html_url,
- :cfr_references,
- :comments_close_on,
+ :mods_url,
+ :action,
:dates,
- :docket_id,
- :document_number,
:effective_on,
+ :comments_close_on,
+ :start_page,
:end_page,
- :full_text_xml_url,
- :html_url,
- :json_url,
- :mods_url,
- :pdf_url,
- :publication_date,
+ :volume,
+ :docket_id,
:regulation_id_numbers,
- :start_page,
- :title,
- :type,
- :volume
+ :cfr_references,
+ :json_url
]
def self.search(args)
View
@@ -52,12 +52,4 @@
end
end
end
-
- describe "quality" do
- context "ATTRIBUTES" do
- it "contains no duplicates" do
- FederalRegister::Agency::ATTRIBUTES.uniq.should == FederalRegister::Agency::ATTRIBUTES
- end
- end
- end
end
@@ -53,12 +53,4 @@
FederalRegister::Article.search(:conditions => {:term => "Fish"}).should be_an_instance_of(FederalRegister::ResultSet)
end
end
-
- describe "quality" do
- context "ATTRIBUTES" do
- it "contains no duplicates" do
- FederalRegister::Article::ATTRIBUTES.uniq.should == FederalRegister::Article::ATTRIBUTES
- end
- end
- end
end

0 comments on commit d188d71

Please sign in to comment.