forked from zendeskarchive/jessie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marcin Bunsch
committed
Jun 3, 2011
1 parent
fe829ac
commit 70f55a6
Showing
7 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class Animal | ||
constructor: (@name) -> | ||
|
||
move: (meters) -> | ||
@name + " moved " + meters + "m." | ||
|
||
class Snake extends Animal | ||
move: -> | ||
super 5 | ||
|
||
class Horse extends Animal | ||
move: -> | ||
super 45 | ||
|
||
exports.Animal = Animal | ||
exports.Snake = Snake | ||
exports.Horse = Horse |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
describe 'Coffee Script support', -> | ||
|
||
it 'should pass', -> | ||
'Foo'.should_be 'Foo' | ||
|
||
it "should work with external Coffee Script code", -> | ||
animals = require('./../coffee/animals.coffee') | ||
sam = new animals.Snake "Sammy" | ||
tom = new animals.Horse "Tommy" | ||
|
||
sam.move().should_be 'Sammy moved 5m.' | ||
tom.move().should_be 'Tommy moved 45m.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
var jessie = require('jessie') | ||
jessie.sugar() | ||
|
||
require('coffee-script'); |