mirror of
https://github.com/atom/atom.git
synced 2026-02-18 02:21:43 -05:00
21 lines
461 B
CoffeeScript
21 lines
461 B
CoffeeScript
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"
|
|
|
|
|