-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Environment #92
Comments
@LauraKirby Looking at https://github.com/hsgubert/cassandra_migrations/blob/master/lib/cassandra_migrations/railtie/tasks.rake it's using
This might be by design but it looks like the call to
That assumes that there is config for that env. Let me know if that works. |
@bsbodden, thank you for noting the rake file. I am able to successfully read and write to the database. The test specs contain things like After more testing,
If i run |
Here is my complete and working
To run tests: one time only do: These methods seem to work when placed right after each When I have included an example of deleting data from a table before each spec is run (see: |
I am not sure if this is a feature request, bug or user error.
issue:
issue:
CassandraMigrations::Cassandra.create_keyspace!('test')
does not create keyspace. Therefore, thetest
keyspace must be manually created withRAILS_ENV=test rake cassandra:drop cassandra:create cassandra:migrate
. After manual creation, I can successfully runbundle exec rspec
, which includes writing and reading fromCassandraMigrations::Cassandra
.ideal solution: ability to run something like what
cassandra:drop cassandra:create cassandra:migrate
offers; however, within./spec/rails_helper
. This might be built but I don't think it is working properly, see setup below.Using Rspec, I would like to create the keyspace, run migrations and drop the keyspace before and after the suite is run. After each test, I would like to clear out the data in all the tables. Below is my attempt at doing this:
./config/cassandra.yml
./spec/rails_helper
run:
bundle exec rspec
The text was updated successfully, but these errors were encountered: