Sha256: 0bf07592e6af89e9be3f99676bf55639ca48b127b8de480a8fe45e344a24965c

Contents?: true

Size: 662 Bytes

Versions: 11

Compression:

Stored size: 662 Bytes

Contents

describe 'up.Config', ->

  describe 'constructor', ->

    it 'creates an object with the given attributes', ->
      object = new up.Config(a: 1, b: 2)
      expect(object.a).toBe(1)
      expect(object.b).toBe(2)

  describe '#reset', ->

    it 'resets the object to its original state', ->
      object = new up.Config(a: 1)
      expect(object.b).toBeUndefined()
      object.a = 2
      expect(object.a).toBe(2)
      object.reset()
      expect(object.a).toBe(1)

    it 'does not remove the #reset or #update method from the object', ->
      object = new up.Config(a: 1)
      object.b = 2
      object.reset()
      expect(object.reset).toBeDefined()

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
unpoly-rails-1.0.3 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-1.0.1 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-1.0.0 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-0.62.1 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-0.62.0 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-0.61.1 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-0.61.0 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-0.60.3 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-0.60.2 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-0.60.1 spec_app/spec/javascripts/up/classes/config_spec.coffee
unpoly-rails-0.60.0 spec_app/spec/javascripts/up/classes/config_spec.coffee