Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 23 lines (13 sloc) 0.54 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
should = require 'should'

users_msg =
  Jim: 'Hello lizard king'
  Pam: 'Hello turkey murderer'
  default: 'Hello world'

class @Login

  'when an user logs in': -> @msg = users_msg.default

  'it should be greeted': -> @msg.should.not.be.undefined

  'when (Jim|Pam) logs in': (user) -> @msg = users_msg[user]

  'it should say @msg': (msg) -> msg.should.eql @msg

  'it should say': (msg) -> msg.trim().should.eql @msg

  'when .* logs in': -> @['when an user logs in']()

  'it should greet (?:her|him)': -> @['it should be greeted']()
Something went wrong with that request. Please try again.