README.md in defekt-0.0.3 vs README.md in defekt-0.0.4

- old
+ new

@@ -48,18 +48,44 @@ def test_name equal_to! 'kodnin', @person.name end def test_age - true! !@person.respond_to?(:age) + not_respond_to! @person, :age @person.stub(:age, 'unknown') do - true! @person.respond_to?(:age) + respond_to! @person, :age equal_to! 'unknown', @person.age end end end Defekt.run +``` + +## Assertions + +All available assertions have negative counterparts prefixed with `not_`. + +- true! +- equal_to! +- identical_to! +- included_in! +- instance_of! +- kind_of! +- respond_to! + +You can add your own assertions by opening up the `Defekt::Assertions` module. + +```ruby +module Defekt + module Assertions + def awesome!(value) + unless value == 'awesome' + raise Errors::AwesomeError, "~#{value}~ is not awesome" + end + end + end +end ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.