update tests and readme

This commit is contained in:
John Bintz 2011-04-15 15:52:27 -04:00
parent 81a31a66df
commit e9e7cb036c
2 changed files with 10 additions and 2 deletions

View File

@ -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!

View File

@ -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