Skip to content

Commit

Permalink
Added README.
Browse files Browse the repository at this point in the history
  • Loading branch information
ydnar committed Jan 4, 2010
1 parent 8dd3a7a commit e4dfead
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
CSSpec
======

BDD for CSS. Inspired by [RSpec](http://rspec.info/), [JSpec](http://visionmedia.github.com/jspec/), [Screw.Unit](http://github.com/nkallen/screw-unit), [jQuery](http://jquery.com/) and unicorns.

Why?
---

Because manually testing CSS sucks. Because they’re *cascading*. Because less time testing means more time for IE6.

How?
----

CSSpec uses a lightweight DSL that doesn’t pollute global objects, knows how to compare equal-but-different values for CSS colors and dimensions and groks browser differences. <sup>1</sup>

with(CSSpec.describe("application.css")) {
describe("(all layouts)", function(){
describe("body", function() {
it("has no padding", function() {
expect($("body").css("padding-left")).toEqual("0px")
})

it("has a white background", function() {
expect($("body").css("background-color")).toEqual("rgb(255, 255, 255)")
})

it("has black text", function() {
expect($("body").css("color")).toEqual("rgb(0, 0, 0)")
})
})
})

run();
}

Huh?
----

[1] It’s not even close to done.

Who?
---

CSSpec is © 2009 Randy Reddig.


0 comments on commit e4dfead

Please sign in to comment.