README.md in key_vortex-contract-0.2.5 vs README.md in key_vortex-contract-1.0.0
- old
+ new
@@ -1,11 +1,9 @@
# KeyVortex::Contract
-Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/key_vortex/contract`. To experiment with that code, run `bin/console` for an interactive prompt.
+Adapters built for [KeyVortex](https://github.com/lambda-Null/key-vortex/) must conform to a common set of behaviors in order to play nicely together. This gem provides [shared examples](https://rubydoc.info/gems/key_vortex-contract/KeyVortex/Contract) that can be included in your tests to verify that you support these behaviors.
-TODO: Delete this and the text above, and describe your gem
-
## Installation
Add this line to your application's Gemfile:
```ruby
@@ -20,10 +18,19 @@
$ gem install key_vortex-contract
## Usage
-TODO: Write usage instructions here
+Within the RSpec tests for your adapter subclass, you can include the contract like this:
+
+```ruby
+require "key_vortex/constract"
+
+RSpec.describe KeyVortex::Adapter::SomethingAwesome do
+ subject { KeyVortex::Adapter::SomethingAwesome.new() }
+ it_behaves_like "an adapter"
+end
+```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.