From 8b662ee9be76c9a7e6fa65f5fd160c2b015e478b Mon Sep 17 00:00:00 2001 From: mo Date: Sun, 24 Sep 2017 18:10:15 -0600 Subject: fix broken spec. --- app/assets/javascripts/cakeside.js.coffee | 4 ++-- spec/helpers/application_helper_spec.rb | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/cakeside.js.coffee b/app/assets/javascripts/cakeside.js.coffee index ec405b12..3c5f91e7 100644 --- a/app/assets/javascripts/cakeside.js.coffee +++ b/app/assets/javascripts/cakeside.js.coffee @@ -51,8 +51,8 @@ window.csx = @photos_cache[cake_id] = photos photos.fetch(reset: true) photos - csx.Application.reqres.setHandler 'ProfilesRepository', => - @profiles ||= new csx.Collections.ProfilesCollection() + #csx.Application.reqres.setHandler 'ProfilesRepository', => + #@profiles ||= new csx.Collections.ProfilesCollection() @cakes.fetch(reset: true).done -> csx.Application.start() diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index b1c8ae68..c2d44e36 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -3,17 +3,17 @@ require "rails_helper" describe ApplicationHelper do describe "#backbone_collection_for" do it 'returns a script with the backbone collection' do - categories = Category.all - result = helper.backbone_collection_for(categories) - expect(result).to include("csx.Categories") - expect(result).to include("Backbone.Collection") + result = helper.backbone_collection_for(Category.all) + expect(result).to include("AutoCollection.install") + expect(result).to include("Category") + expect(result).to include("categories") end it 'escapes namespaces correctly' do - tags = ActsAsTaggableOn::Tag.all - result = helper.backbone_collection_for(tags) - expect(result).to include("csx.Tags") - expect(result).to include("Backbone.Collection") + result = helper.backbone_collection_for(ActsAsTaggableOn::Tag.all) + expect(result).to include("AutoCollection.install") + expect(result).to include("Tag") + expect(result).to include("acts_as_taggable_on_tags") end end end -- cgit v1.2.3