exercism/coffeescript/hello-world/hello_world.spec.coffee

17 lines
427 B
CoffeeScript
Raw Normal View History

2016-08-13 23:20:14 +00:00
HelloWorld = require "./hello_world"
describe "HelloWorld", ->
hello_world = new HelloWorld()
it "given no name", ->
result = hello_world.hello()
expect(result).toEqual "Hello, World!"
it "given the name 'Alice'", ->
result = hello_world.hello 'Alice'
expect(result).toEqual "Hello, Alice!"
it "given the name 'Bob'", ->
result = hello_world.hello 'Bob'
expect(result).toEqual "Hello, Bob!"