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