Sha256: 263f4fec3e307ba94ad273ada23ef42c862a206211697a04f0e7e25369983350

Contents?: true

Size: 1020 Bytes

Versions: 10

Compression:

Stored size: 1020 Bytes

Contents

describe("NinjsModule", function() {

  var app;

  beforeEach(function() {
    app = new NinjsApplication('myapp');
  });

  it("should return the module when added", function() {
    var module = app.add_module('mymod');
    expect(module).toEqual(app.mymod);
  });

  it("should have the correct default values", function() {
    app.add_module('testmodule');
    // properties    
    expect(is_defined(app.testmodule.data)).toBeTruthy();
    expect(is_defined(app.testmodule.name)).toBeTruthy();
    expect(app.testmodule.name).toEqual('testmodule');

    // methods
    expect(is_defined(app.testmodule.actions)).toBeTruthy();
    expect(is_typeof(Function, app.testmodule.actions)).toBeTruthy();
    expect(is_defined(app.testmodule.run)).toBeTruthy();
    expect(is_typeof(Function, app.testmodule.run)).toBeTruthy();
    expect(is_defined(app.testmodule.execute)).toBeTruthy();
    expect(is_defined(app.testmodule.elements)).toBeTruthy();
    expect(is_defined(app.testmodule.set_data)).toBeTruthy();
  });
});

Version data entries

10 entries across 9 versions & 2 rubygems

Version Path
ninjs-0.16.8 repository/ninjs/spec/javascripts/module_spec.js
ninjs-0.16.7 repository/ninjs/spec/javascripts/module_spec.js
ninjs-0.16.6 repository/ninjs/spec/javascripts/module_spec.js
ninjs-0.16.5 repository/ninjs/spec/javascripts/module_spec.js
ninjs-0.16.4 repository/ninjs/spec/javascripts/module_spec.js
ninjs-framework-0.1.0 spec/tmp/spec/javascripts/module_spec.js
ninjs-framework-0.1.0 spec/javascripts/module_spec.js
ninjs-0.16.3 repository/ninjs/spec/javascripts/module_spec.js
ninjs-0.16.2 repository/ninjs/spec/javascripts/module_spec.js
ninjs-0.16.1 repository/ninjs/spec/javascripts/module_spec.js