Skip to content

Instantly share code, notes, and snippets.

@searls
Created July 15, 2011 14:34
Show Gist options
  • Save searls/1084801 to your computer and use it in GitHub Desktop.
Save searls/1084801 to your computer and use it in GitHub Desktop.
Here's why users are polluting "this" in Jasmine"
describe 'chum', ->
chum=null
beforeEach -> chum = 'D.W. Frank'
it 'is chummy', ->
expect(chum).toBe('D.W. Frank')
describe 'chum', ->
beforeEach -> @chum = 'D.W. Frank'
it 'is chummy', ->
expect(@chum).toBe('D.W. Frank')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment