flatiron / plates

Light-weight, logic-less, DSL-free, templates for all javascript environments!
MIT License
831 stars 69 forks source link

[test] Add test to highlight the wrongness of hasClass function #41

Closed pksunkara closed 12 years ago

pksunkara commented 12 years ago

@hij1nx, please check

/cc @jesusabdullah @nhunzaker

jfhbrook commented 12 years ago

What is this supposed to demonstrate?

heapwolf commented 12 years ago

Agreed. Im not sure I understand. If there is a deficiency with the hasClass function, this should be internally fixed, we dont need tests to prove that there is a flaw in the design of our program, we need tests to prove that the design of our program works. Please elaborate on this pull request.

pksunkara commented 12 years ago

hasClass uses indexOf to check for a class. So it gives true even if the class name is username and we are checking for name. This test is for proving that the design works in this case also. Now we have to correct the hasClass function.

heapwolf commented 12 years ago

this is a really simple fix. just go ahead and fix and add to this pull request. =)

pksunkara commented 12 years ago

@hij1nx what's the status with this?

heapwolf commented 12 years ago

This commit is noisy because of the whitespace cleanup. please separate the requests and submit a new pull request. (p.s. sorry i didnt get back to you sooner, i've been buried in the cloudsockets project)

pksunkara commented 12 years ago

cleaned up