Skip to content

jeroeningen/testopdracht

Repository files navigation

HOWTO INSTALL

  1. Get the project by using the command ‘git clone github.com/jeroeningen/testopdracht.git

  2. Create the database.yml in config/database.yml

  3. Install the necessary gems by using command ‘bundle install’

  4. Setup the database using the commands ‘rake db:create’ and ‘rake db:migrate’. If you need the test database, please also run ‘rake db:test:clone’

  5. Start the server with command ‘rails s’

  6. THAT’S IT.

INSTALLATION NOTES

When you’re using Linux, before you run the command ‘bundle install’, make sure you installed the following packages as well:

  • ruby1.8-dev

  • libxml2

  • libxslt-dev

  • libxml2-dev

  • libmysql-ruby

  • libmysqlclient-dev

  • xvfb

HOWTO DEPLOY

By default this application uses Capistrano and Phusion Passenger (mod_rails) This application includes deploy scripts for production and development environment. Note that Capistrano creates the databases for you, you do not need to create it yourself. Although you have to create your Apache directive yourself. It should look like as follows:

RailsBaseURI /testopdracht_production
<Directory /var/www/testopdracht_production>
    Options -MultiViews
</Directory> 

RailsBaseURI /testopdracht_development
<Directory /var/www/testopdracht_development>

RailsEnv development

    Options -MultiViews
</Directory>

TESTS

This application comes with Cucumber and Rspec tests (including autotest)

To run the Cucumber tests, use the command ‘cucumber’.

To run the Rspec tests, use the command ‘autotest’. Note that Growl-notifications are disabled by default, see the file ~/.autotest.

Cucumber is now intergrated in the command ‘autotest’. The autotest assumes you have a virtual frame buffer running on ‘DISPLAY=:99’. To initialize the virtual frame buffer you can use the script ‘xvfb’ that is included in the ‘script’ directory. Note that this script requires the package ‘xvfb’

FAQ

  1. Help, my Cucumber installation seems to be broken!

  2. Please remove the Cucumber gem with the command ‘sudo gem uninstall cucumber-rails’ and then run the command ‘bundle install’.


  1. The commands ‘autotest’ and/or ‘cucumber’ are not working.

  2. Please use the command ‘bundle exec autotest’ and ‘bundle exec cucumber’ instead.


  1. LOSER! Your Cucumber tests are broken! It won’t return the area where I’m living, when I enter my zipcode.

  2. This is probably a performance issue; the Cucumber tests are unfortunately quite heavy. Please make sure the Rspec-tests are running well and rerun the Cucumber test while your computer is in idle.


  1. You bundled the gem ‘rcov’. How can I use it?

  2. Please run ‘rake rcov:rspec’ for RSpec and ‘rake rcov:cucumber’ for Cucumber. Results are written to the directory ~/coverage.

About

testopdracht

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published