From e9e7cb036c277f679c092d6def47b1839ed60558 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Fri, 15 Apr 2011 15:52:27 -0400 Subject: [PATCH] update tests and readme --- README.md | 8 ++++++++ spec/bin/backbone-generator_spec.rb | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 00de40e..6fbba6a 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,13 @@ Currently only works with Rails-ish projects and with Jasmine & Jammit. I'm self * `public/javascripts/collections/admin/users.js` * `spec/javascripts/collections/admin/users_spec.js` +### Collection View + +`backbone-generate collection-view Admin::User` creates an AdminUsersView object in: + +* `public/javascripts/views/admin/users.js` +* `spec/javascripts/views/admin/users_spec.js` +* `app/views/admin/users.jst` + Please add more and make it more friendly with things that are not Rails, Jasmine, and Jammit! diff --git a/spec/bin/backbone-generator_spec.rb b/spec/bin/backbone-generator_spec.rb index 196c89c..5b7a958 100644 --- a/spec/bin/backbone-generator_spec.rb +++ b/spec/bin/backbone-generator_spec.rb @@ -45,9 +45,9 @@ describe 'backbone-generator' do File.file?(spec = 'spec/javascripts/views/section/models_spec.js').should be_true File.file?(template = 'app/views/section/models.jst').should be_true - File.read(view).should match(/SectionModels/) + File.read(view).should match(/SectionModelsView/) File.read(view).should match(%r{template: JST\['section/models'\]}) - File.read(spec).should match(/SectionModels/) + File.read(spec).should match(/SectionModelsView/) end end