Sha256: be0eb7e315256ce8e4cebf1c74cc1b19c677b1f935e3f047f5781e66921a12f6

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

describe("Lagniappe", function() {

  //NOTE: must test before extending prototypes
  describe("Chain",function(){

    it("should equal the original", function(){
      subject = f().chain( "stringTest", f.types.Stringy )
      expect(subject === "stringTest").toBeTruthy();
    });

    it("should add functions", function(){
      subject = f().chain( "stringTest", f.types.Stringy )
      expect(subject.underscore !== void 0).toBeTruthy()
    });

    it("should not alter the prototypes", function(){
      subject = f().chain( "stringTest", f.types.Stringy )
      expect(String.prototype.underscore === void 0).toBeTruthy()
    });

    //it("strings should be chanable", function(){
    //  subject = "stringTest";
    //  expect(subject.capitalize().underscore() ).toEqual("string_test");
    //  var new_string = "Im a new String";
    //  expect(new_string.underscore === void 0).toBeTruthy()
    //});

  });


  //describe("extend prototypes",function(){

  //  beforeEach(function(){
  //    f().extendPrototypes();
  //  });
  //  
  //  it("should add capitalize to string", function(){
  //    subject = "string";
  //    expect(subject.capitalize() ).toEqual("String");
  //  });

  //  it("should work for numbery", function(){
  //    subject = 2;
  //    expect( subject.isEven() ).toBeTruthy();
  //  });

  //});

});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alt159-rails-0.0.3 vendor/assets/javascripts/alt159/spec/LagniappeSpec.js
alt159-rails-0.0.2 vendor/assets/javascripts/alt159/spec/LagniappeSpec.js