Skip to content

Instantly share code, notes, and snippets.

Setting up Guard with Rspec

Guard watches a directory and runs commands when it sees changes to files.

This is great for automating your rspec tests!

Set up

Add guard and guard-rspec to your Gemfile

@catm705
catm705 / gist:10011321
Last active March 24, 2021 04:01
Steps for Rails w/Rspec App (initlal - no CRUD, just for :development, :test)
----------------------------------------------------------------------
#### Steps to create Rails App ####
----------------------------------------------------------------------
1.) rails new app_name -d postgresql
'Jesse's way': rails g model Complaint descriptor:string address:string latitude:decimal longitude:decimal zip:integer
2.) database.yml → 'Phil's gist'
- put in: echo $USER in the terminal right after to make sure it works.
3.) rake db:create
4.) Insert ‘gem’ gist for development:
@JayK31
JayK31 / full_rails_gemfile.rb
Last active August 29, 2015 14:00
Full Rails Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.0'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
________________________________________________________________________
GIT HUB WITH PROJECTS
________________________________________________________________________
* git branch -d → Will delete the branch completely if it SUCKS.
* AlWAYS pull first before you start your work.
* git checkout develop → Never work on master branch.
- Your MASTER branch must always work.
________________________________________________________________________
@CH-JesseMa
CH-JesseMa / .travis.yml
Created April 25, 2014 19:13
Travis.yml file
language: ruby
rvm:
- 2.1.0
before_script:
- "sh -e /etc/init.d/xvfb start"
- "export DISPLAY=:99.0"
- "export JASMINE_SPEC_FORMAT=documentation"
env:
- PG_USERNAME='postgres'
script:
language: ruby
rvm:
- 2.1.0
before_script:
- "sh -e /etc/init.d/xvfb start"
- "export DISPLAY=:99.0"
- "export JASMINE_SPEC_FORMAT=documentation"
env:
- PG_USERNAME='postgres'
script: