Sha256: 36c77e61950fe48d7b140de4ab899f1582f649a19ced5309a12a4c130cf3140f
Contents?: true
Size: 646 Bytes
Versions: 2
Compression:
Stored size: 646 Bytes
Contents
require File.join(File.dirname(__FILE__), "..", "test_helper") class ResourceCollectionTest < Test::Unit::TestCase context "collections" do setup do @books = [ ResourceFactory.build(:nonfiction_book), ResourceFactory.build(:nonfiction_book) ] @collection = ResourceCollection.build(@books) end should "have a header that reflects the pluralized resource type" do assert_match(/<nonfiction-books>/, @collection.to_xml) end should "contain each items' xml" do @books.each do |b| assert_match(/#{b.to_xml}/, @collection.to_xml) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dpickett-resource_factory-0.5.0 | test/lib/resource_collection_test.rb |
dpickett-resource_factory-0.5.1 | test/lib/resource_collection_test.rb |