mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Half-baked template experiment
This commit is contained in:
20
spec/stdlib/template-spec.coffee
Normal file
20
spec/stdlib/template-spec.coffee
Normal file
@@ -0,0 +1,20 @@
|
||||
Template = require 'template'
|
||||
|
||||
describe "Template", ->
|
||||
describe "toView", ->
|
||||
Foo = null
|
||||
|
||||
beforeEach ->
|
||||
class Foo extends Template
|
||||
content: ->
|
||||
div ->
|
||||
h1 @title
|
||||
|
||||
afterEach ->
|
||||
delete window.Foo
|
||||
|
||||
it "builds a jquery object based on the content method and extends it with the viewProperties", ->
|
||||
view = Foo.buildView(title: "Hello World")
|
||||
expect(view.find('h1').text()).toEqual "Hello World"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user