Created
November 21, 2013 22:36
-
-
Save Tasha25/7591055 to your computer and use it in GitHub Desktop.
Zombie Rspec setup, gemfile not as awesome as candy_app
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
Creating a rails rspec document | |
$rails _3.2.14_ new zombie_rails -d postgresql | |
create | |
create README.rdoc | |
create Rakefile | |
create config.ru | |
create .gitignore | |
create Gemfile | |
create app | |
create app/assets/images/rails.png | |
create app/assets/javascripts/application.js | |
create app/assets/stylesheets/application.css | |
create app/controllers/application_controller.rb | |
create app/helpers/application_helper.rb | |
create app/mailers | |
create app/models | |
create app/views/layouts/application.html.erb | |
create app/mailers/.gitkeep | |
create app/models/.gitkeep | |
create config | |
create config/routes.rb | |
create config/application.rb | |
create config/environment.rb | |
create config/environments | |
create config/environments/development.rb | |
create config/environments/production.rb | |
create config/environments/test.rb | |
create config/initializers | |
create config/initializers/backtrace_silencers.rb | |
create config/initializers/inflections.rb | |
create config/initializers/mime_types.rb | |
create config/initializers/secret_token.rb | |
create config/initializers/session_store.rb | |
create config/initializers/wrap_parameters.rb | |
create config/locales | |
create config/locales/en.yml | |
create config/boot.rb | |
create config/database.yml | |
create db | |
create db/seeds.rb | |
create doc | |
create doc/README_FOR_APP | |
create lib | |
create lib/tasks | |
create lib/tasks/.gitkeep | |
create lib/assets | |
create lib/assets/.gitkeep | |
create log | |
create log/.gitkeep | |
create public | |
create public/404.html | |
create public/422.html | |
create public/500.html | |
create public/favicon.ico | |
create public/index.html | |
create public/robots.txt | |
create script | |
create script/rails | |
create test/fixtures | |
create test/fixtures/.gitkeep | |
create test/functional | |
create test/functional/.gitkeep | |
create test/integration | |
create test/integration/.gitkeep | |
create test/unit | |
create test/unit/.gitkeep | |
create test/performance/browsing_test.rb | |
create test/test_helper.rb | |
create tmp/cache | |
create tmp/cache/assets | |
create vendor/assets/javascripts | |
create vendor/assets/javascripts/.gitkeep | |
create vendor/assets/stylesheets | |
create vendor/assets/stylesheets/.gitkeep | |
create vendor/plugins | |
create vendor/plugins/.gitkeep | |
run bundle install | |
Fetching gem metadata from https://rubygems.org/........... | |
Fetching gem metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Using rake (10.1.0) | |
Using i18n (0.6.5) | |
Using multi_json (1.8.2) | |
Using activesupport (3.2.14) | |
Using builder (3.0.4) | |
Using activemodel (3.2.14) | |
Using erubis (2.7.0) | |
Using journey (1.0.4) | |
Using rack (1.4.5) | |
Using rack-cache (1.2) | |
Using rack-test (0.6.2) | |
Using hike (1.2.3) | |
Using tilt (1.4.1) | |
Using sprockets (2.2.2) | |
Using actionpack (3.2.14) | |
Using mime-types (1.25) | |
Using polyglot (0.3.3) | |
Using treetop (1.4.15) | |
Using mail (2.5.4) | |
Using actionmailer (3.2.14) | |
Installing arel (3.0.3) | |
Using tzinfo (0.3.38) | |
Using activerecord (3.2.14) | |
Using activeresource (3.2.14) | |
Using bundler (1.3.5) | |
Using coffee-script-source (1.6.3) | |
Using execjs (2.0.2) | |
Using coffee-script (2.2.0) | |
Using rack-ssl (1.3.3) | |
Using json (1.8.1) | |
Using rdoc (3.12.2) | |
Using thor (0.18.1) | |
Using railties (3.2.14) | |
Using coffee-rails (3.2.2) | |
Using jquery-rails (3.0.4) | |
Using pg (0.17.0) | |
Using rails (3.2.14) | |
Using sass (3.2.12) | |
Using sass-rails (3.2.6) | |
Using uglifier (2.3.1) | |
Your bundle is complete! | |
Use `bundle show [gemname]` to see where a bundled gem is installed. | |
$cd zombie_rails | |
$sublime . | |
In Gemfile | |
1. gem "rspec-rails", :group => [:test, :development] | |
2. gems in your gist (https://gist.github.com/Tasha25/7024875) | |
3. We will be using 'bcyrpt-ruby' so comment it in…its default has it commented out of code | |
$ bundle install | |
Resolving dependencies... | |
Using rake (10.1.0) | |
Using i18n (0.6.5) | |
Using multi_json (1.8.2) | |
Using activesupport (3.2.14) | |
Using builder (3.0.4) | |
Using activemodel (3.2.14) | |
Using erubis (2.7.0) | |
Using journey (1.0.4) | |
Using rack (1.4.5) | |
Using rack-cache (1.2) | |
Using rack-test (0.6.2) | |
Using hike (1.2.3) | |
Using tilt (1.4.1) | |
Using sprockets (2.2.2) | |
Using actionpack (3.2.14) | |
Using mime-types (1.25) | |
Using polyglot (0.3.3) | |
Using treetop (1.4.15) | |
Using mail (2.5.4) | |
Using actionmailer (3.2.14) | |
Using arel (3.0.3) | |
Using tzinfo (0.3.38) | |
Using activerecord (3.2.14) | |
Using activeresource (3.2.14) | |
Using annotate (2.5.0) | |
Using awesome_print (1.2.0) | |
Using bcrypt-ruby (3.0.1) | |
Using coderay (1.1.0) | |
Using better_errors (1.0.1) | |
Using debug_inspector (0.0.2) | |
Using binding_of_caller (0.7.2) | |
Using bundler (1.3.5) | |
Using callsite (0.0.11) | |
Using choice (0.1.6) | |
Using coffee-script-source (1.6.3) | |
Using execjs (2.0.2) | |
Using coffee-script (2.2.0) | |
Using rack-ssl (1.3.3) | |
Using json (1.8.1) | |
Using rdoc (3.12.2) | |
Using thor (0.18.1) | |
Using railties (3.2.14) | |
Using coffee-rails (3.2.2) | |
Using columnize (0.3.6) | |
Using debugger-linecache (1.2.0) | |
Using debugger-ruby_core_source (1.2.3) | |
Using debugger (1.6.2) | |
Using diff-lcs (1.2.5) | |
Using jquery-rails (3.0.4) | |
Using rack-contrib (1.1.0) | |
Using meta_request (0.2.8) | |
Using method_source (0.8.2) | |
Using pg (0.17.0) | |
Using slop (3.4.7) | |
Using pry (0.9.12.3) | |
Using pry-debugger (0.2.2) | |
Using pry-rails (0.3.2) | |
Using pry-stack_explorer (0.4.9.1) | |
Using quiet_assets (1.0.2) | |
Using rails (3.2.14) | |
Using ruby-graphviz (1.0.9) | |
Using rails-erd (1.1.0) | |
Using rspec-core (2.14.7) | |
Using rspec-expectations (2.14.4) | |
Using rspec-mocks (2.14.4) | |
Using rspec-rails (2.14.0) | |
Using sass (3.2.12) | |
Using sass-rails (3.2.6) | |
Using uglifier (2.3.1) | |
Your bundle is complete! | |
Use `bundle show [gemname]` to see where a bundled gem is installed. | |
$ rails g rspec:install | |
create .rspec | |
create spec | |
create spec/spec_helper.rb | |
This is optionally, I went into the spec_helper and pasted the following code: | |
== code started | |
# Use color in STDOUT | |
config.color_enabled = true | |
# Use color not only in STDOUT but also in pagers and files | |
config.tty = true | |
# Use the specified formatter | |
config.formatter = :documentation # :progress, :html, :textmate | |
==code end | |
it gives it a different layout | |
 | |
$rake db:create | |
$ rails g model Zombie name:string brains:integer hungry:boolean weapon:integer | |
outputted on screen | |
invoke active_record | |
create db/migrate/20131120014024_create_zombies.rb | |
create app/models/zombie.rb | |
invoke rspec | |
create spec/models/zombie_spec.rb | |
THIS INFORMATION MIGHT BE NEEDED LATER IF YOU HAVE TO ADD INFORMATION | |
 | |
$ rake db:migrate #this will not allow us to use database during the testing period | |
== CreateZombies: migrating ================================================== | |
-- create_table(:zombies) | |
-> 0.2821s | |
== CreateZombies: migrated (0.2822s) ========================================= | |
$ RAILS_ENV=test rake db:migrate #this runs during testing time | |
== CreateZombies: migrating ================================================== | |
-- create_table(:zombies) | |
-> 0.0985s | |
== CreateZombies: migrated (0.0986s) ========================================= | |
Now pull up the zombie_spec.rb | |
There will be some writing in there and you can run the below column in the terminal. It should run. | |
$rspec | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment