Sha256: bd51f36667a0e62fec01a1f4771dff7119f94f56f30bd800cd8f61949da4538d

Contents?: true

Size: 500 Bytes

Versions: 13

Compression:

Stored size: 500 Bytes

Contents

describe("<%=class_name%>", function() {
  var model;

  describe("defaults", function() {
    beforeEach(function() { model = new <%=class_name%>(); });
    
    <%- attributes.each do |attr| -%>
    it("should have a '<%=attr.name%>' attribute", function() {
      expect(model.<%=attr.name%>).toEqual(<%=attr.default.to_json%>);
    });
    
    <%- end -%>
  });
  
  it("should instantiate without errors", function() {
    expect(function() { new <%=class_name%>(); }).not.toThrow();
  });
});

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
jax-2.0.12 templates/model_spec.js.erb
jax-2.0.11 templates/model_spec.js.erb
jax-2.0.10 templates/model_spec.js.erb
jax-2.0.9 templates/model_spec.js.erb
jax-2.0.8 templates/model_spec.js.erb
jax-2.0.7 templates/model_spec.js.erb
jax-2.0.6 templates/model_spec.js.erb
jax-2.0.5 templates/model_spec.js.erb
jax-2.0.4 templates/model_spec.js.erb
jax-2.0.3 templates/model_spec.js.erb
jax-2.0.2 templates/model_spec.js.erb
jax-2.0.1 templates/model_spec.js.erb
jax-2.0.0 templates/model_spec.js.erb