This is a short description of your app.
- Ruby
- PostgreSQL (e.g. Postgres.app)
$ bin/bootstrap
$ bin/rspec
$ bin/rails server
--color | |
-r turnip/rspec |
This is a short description of your app.
$ bin/bootstrap
$ bin/rspec
$ bin/rails server
#!/bin/sh | |
set -e | |
brew_ensure() { | |
package=$1 | |
brew info $package | grep "Not installed" > /dev/null 2>&1 | |
if [[ "$?" -eq "0" ]]; then | |
brew install $package | |
fi | |
} | |
if ! which brew > /dev/null 2>&1; then | |
# Install http://brew.sh | |
echo '**** Installing Homebrew...' | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
echo '**** DONE!' | |
fi | |
echo '**** Install brew packages...' | |
# e.g. brew_ensure postgresql | |
echo '**** DONE!' | |
echo '**** Install gems...' | |
gem install bundler | |
bundle install | |
# Other gems not in Gemfile | |
# e.g. gem install foreman | |
echo '**** DONE!' | |
echo '**** Setting up database...' | |
bin/rake db:setup | |
RAILS_ENV=test bin/rake db:schema:load | |
echo '**** DONE!' |
ENV['RAILS_ENV'] ||= 'test' | |
require 'spec_helper' | |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rspec/rails' | |
ActiveRecord::Migration.maintain_test_schema! | |
RSpec.configure do |config| | |
config.fixture_path = "#{::Rails.root}/spec/fixtures" | |
config.use_transactional_fixtures = true | |
config.infer_spec_type_from_file_location! | |
end |
require 'dotenv' | |
Dotenv.load | |
RSpec.configure do |config| | |
config.mock_with :rspec do |mocks| | |
mocks.verify_partial_doubles = true | |
end | |
if config.files_to_run.one? | |
config.default_formatter = 'doc' | |
end | |
config.disable_monkey_patching! | |
config.order = :random | |
Kernel.srand config.seed | |
end |
require 'rails_spec_helper' | |
# e.g. require 'steps/some_steps' | |
# RSpec.configure do |c| | |
# e.g. c.include SomeSteps | |
# end |