Sha256: ebffd34e5a65e67d336540e8aea71ab2bf4b00bb48986cbd7b132a262723d5b4
Contents?: true
Size: 750 Bytes
Versions: 3
Compression:
Stored size: 750 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../helpers/model_test_helper') class SourceTest < ModelTestCase include DataCatalog context "Source" do before do @required = { :title => "Treasury 2009 Summary", :url => "http://moneybags.gov/data/2009" } end context "correct params" do before do @source = Source.new(@required) end test "should be valid" do assert_equal true, @source.valid? end end [:title, :url].each do |missing| context "missing #{missing}" do before do @source = Source.new(@required.delete_if { |k, v| k == missing }) end missing_key(:source, missing) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems