Created
January 9, 2014 17:15
-
-
Save zumbalogy/8338016 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STARTING UP WITH RAILS Tunr App | |
$ rails new tunr_app -d postgresql -T | |
* update database.yml —> change default username to my username | |
* remove default index page —> $ rm public/index.html | |
$ rake db:create | |
* Create the database | |
$ rake db:migrate | |
* create the schema migration table so that we can use rake spec. | |
* when we run rake spec for the first time it will do this for us (if we want to just wait/skip this step) | |
# update gem file # | |
* gem 'rspec-rails' | |
* gem ‘capybara' | |
$ bundle install | |
* update the bundle with our testing suite | |
$ rails g rspec:install | |
* generate our base testing files in the project | |
# update spec helper # | |
* require ‘capybara/rspec’ (near the top) | |
* config.formatter = :documentation (somewhere within the RSpec.configure do |config| block) | |
* this shows us the nice documentation when we run our tests | |
$ rails g model Musician name:string | |
* create migration, model and spec | |
$ rake db:migrate | |
* to create that new table we wanted | |
## THIS IS WHERE WE REALLY START WORKING WITH TDD ## | |
FEATURES | |
$ mkdir spec/features | |
$ touch spec/features/musicians_feature_spec.rb | |
CONTROLLERS | |
$ touch app/controllers/musicians_controller.rb | |
VIEWS | |
$ mkdir app/views/musicians | |
$ touch app/views/musicians/new.html.erb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment