cequel/cequel — pull request #106 by pezra (2014-05-02 19:05:51+00:00)
Title: Convenience methods for test preparation

Creates a `Cequel::SpecSupport::Preparation` singleton that provides the following behavior:

* `#drop_keyspace` - ensures the absence of the keyspace for the current environment
* `#create_keyspace` - ensures the presence of the keyspace for the current environment
* `#sync_schema` - finds all record classes and ensures that their tables match their definitions

These can be used to ensure a clean and fully synced test db by adding the following to the bottom of one's `spec_helper.rb` (below the `RSpec.configure` block).

```ruby
# one time setup
Cequel::SpecSupport::Preparation.instance.tap do |prep|
prep.drop_keyspace
prep.create_keyspace
prep.sync_schema
end
```