While trying to migrate, I keep getting this error:
rake aborted!
test-unit is not part of the bundle. Add it to Gemfile.
If I'm using RSpec, can I just delete the test folder altogether?
To run a single Rspec test file, you can do: rspec spec/models/your_spec. rb to run the tests in the your_spec. rb file.
RSpec is a testing tool for Ruby, created for behavior-driven development (BDD). It is the most frequently used testing library for Ruby in production applications. Even though it has a very rich and powerful DSL (domain-specific language), at its core it is a simple tool which you can start using rather quickly.
Rails default testing framework gives you test folder for you rails default testing framework, if you want to use RSpec testing framework, which gives you folder called 'spec' RSPEC, it is your wish to select which option, RSPEC specs are more readable, people use both ways.
This error means that somewhere inside your project there is a require test-unit
without it being specified in the Gemfile
.
So you should actually try to find that statement and remove it to fix this error (or add the dependency to the gemfile --but that sounds a bit backwards if you are not using it).
Anyway: you can definitely remove the test
folder if you are using rspec
.
I believe so. Rspec should only be looking for tests in ../spec/*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With