-
Notifications
You must be signed in to change notification settings - Fork 650
Testing
make check
This will setup the testing environment if needed, and run all WORKING_SPECS defined inside the Makefile.
This can be also used whenever you break something in the testing environment (for example if you drop a required table), just drop the carto_db_test
database and it will get recreated.
bundle exec rspec spec/models/visualization/member_spec.rb
This will run all specs found inside member_spec.rb file
bundle exec rspec spec/models/visualization/member_spec.rb:15
This will run either the test/spec found around line 15 (the spec that contains that line), or the full suite from that line onwards if wasn't included in a specific spec.
If you can build a unit test without any dependencies, great as it will run really fast, but in general you'll need to include the following require to make standard tests that load the DB, configuration and such:
require_relative '../../spec_helper'
Refer to RSpec 2.x documentation.