README.md in fracture-0.10.1 vs README.md in fracture-0.11.1

- old
+ new

@@ -1,6 +1,6 @@ -# Fracture +# Fracture [![Gem Version](https://badge.fury.io/rb/fracture.png)](http://badge.fury.io/rb/fracture) Unified view testing for your view or controller specs. Fracture allows you to define text or selector once at the top of a spec file. It also allows grouping of multiple text or selectors snippets using one label. Defining what you are looking for in one place prevents issues when a name (or selector) you are searching for is changed on a view which would only result in one failing spec, the other spec checking for the non exisitence would not fail so you would not find this 'always' passing spec. @@ -82,11 +82,11 @@ context "as user" do describe "as an user" do it "index" do login_as :user # psuedo code for example get :index - response.body.should have_fracture(:add) + response.body.should_not have_fracture(:add) end end end end ``` @@ -103,10 +103,14 @@ ``` ### Selector ```ruby Fracture.define_selector(:label_1, "#an_id", ".a_class", ".another_class") ``` +If the items is left blank then the label will be used as the item as an id selector +```ruby +Fracture.define_selector(:label_1) # equiv. Fracture.define_selector(:label_1, '#label_1') +``` Currently there is no way to build text and selectors into one definition (future feature). Another future feature will be to support 'within'. ## Matchers Example Definitions @@ -177,9 +181,10 @@ # TODO * Support text and selector in one fracture * Support qty of expected fractures on page (selector count) +* Support Rake task to display matrix of context and fractures (to see if all are covered) ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)