diff --git a/README.md b/README.md index 0e322f1b..f15f250e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # HUBZone Map -This application will eventually house the new and improved HUBZone Map for the Small Business Administration. +This application houses the new and improved HUBZone Map for the Small Business Administration. All development is currently being done off of the `develop` branch. Requirements: * rvm @@ -14,20 +14,20 @@ Requirements: * `nvm install 5` * bundler 1.12.5 - `gem install -v 1.12.5 bundler` -* postgresql 9.6 +* postgresql 9.5 * Mac - I use [Postgres.app](http://postgresapp.com/) - could also use `brew install postgresql` - set `PGSQL_HOME` to your installation dir - - e.g. `export PGSQL_HOME=/Applications/Postgres.app/Contents/Versions/9.6` + - e.g. `export PGSQL_HOME=/Applications/Postgres.app/Contents/Versions/9.5` - ensure that the bin directory is in your path - e.g. `export PATH=${PATH}:${PGSQL_HOME}/bin` * Linux (rhel) * Install: - * `yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-redhat96-9.6-3.noarch.rpm` - * `yum install postgresql96-server postgresql96-devel` + * `yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-redhat95-9.5-3.noarch.rpm` + * `yum install postgresql95-server postgresql95-devel` * Configure: - * `echo 'export PGSQL_HOME=/usr/pgsql-9.6' >> ~/.bashrc` + * `echo 'export PGSQL_HOME=/usr/pgsql-9.5' >> ~/.bashrc` * `echo 'export PATH=${PATH}:${PGSQL_HOME}/bin' >> ~/.bashrc` After cloning the repo, run the following: @@ -44,12 +44,45 @@ To run the test suite, simply run: * `rspec` * or with verbose output: `rspec -f d` -To look at the map from the google-maps-api-playground repo, run the following: +To launch the map: ``` bash cd hubzone_map -git checkout map-playground +git checkout develop +git pull rails server ``` -Then point your browser to http://localhost:3000/map/fake +Then point your browser to http://localhost:3000/ -! +# Running Tests # + + +## Javascript Tests ## +### Teaspoon / Jasmine / Istanbul Unit and Coverage tests ### +Teaspoon is used for Javascript testing and coverage. It runs Jasmine for unit and integration tests and Istanbul for test coverage. + +First install Istanbul: +``` +npm install -g istanbul +``` + +To run Teaspoon for unit tests, run: +``` + RAILS_ENV=test bundle exec teaspoon +``` + +To include Istanbul coverage tests, run: +``` + RAILS_ENV=test bundle exec teaspoon --coverage=default +``` + +To view interactive report of test coverage, open: +``` +coverage/default/index.html +``` + +### JSHint Lint Tests ### +Tring to use this JSHint gem [JSHint](https://github.com/damian/jshint), per its docs: + +Add `gem 'jshint'` to the Gemfile under `group :development, :test` + +Run `bundle` to install, then run `bundle exec rake jshint` to run test. Currently this is running the linter then causing a rake error, which appears to be an ongoing issue with this gem.