spec/couchrest/subclass_spec.rb in couchrest_model-1.0.0.beta8 vs spec/couchrest/subclass_spec.rb in couchrest_model-1.0.0
- old
+ new
@@ -90,10 +90,10 @@
Course.refresh_design_doc
OnlineCourse.refresh_design_doc
OnlineCourse.design_doc['views'].keys.should_not include('by_title')
end
- it "should have an all view with a guard clause for couchrest-type == subclass name in the map function" do
- OnlineCourse.design_doc['views']['all']['map'].should =~ /if \(doc\['couchrest-type'\] == 'OnlineCourse'\)/
+ it "should have an all view with a guard clause for model == subclass name in the map function" do
+ OnlineCourse.design_doc['views']['all']['map'].should =~ /if \(doc\['#{OnlineCourse.model_type_key}'\] == 'OnlineCourse'\)/
end
end