-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
178 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--color |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,20 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | ||
gem 'rails', '4.0.0' | ||
|
||
# Use postgresql as the database for Active Record | ||
gem 'pg' | ||
|
||
# Use SCSS for stylesheets | ||
gem 'sass-rails', '~> 4.0.0' | ||
|
||
# Use Uglifier as compressor for JavaScript assets | ||
gem 'uglifier', '>= 1.3.0' | ||
|
||
# Use CoffeeScript for .js.coffee assets and views | ||
gem 'coffee-rails', '~> 4.0.0' | ||
|
||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes | ||
# gem 'therubyracer', platforms: :ruby | ||
|
||
# Use jquery as the JavaScript library | ||
gem 'jquery-rails' | ||
|
||
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks | ||
gem 'turbolinks' | ||
|
||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder | ||
gem 'jbuilder', '~> 1.2' | ||
|
||
group :doc do | ||
# bundle exec rake doc:rails generates the API under doc/api. | ||
gem 'sdoc', require: false | ||
end | ||
|
||
# Use ActiveModel has_secure_password | ||
# gem 'bcrypt-ruby', '~> 3.0.0' | ||
|
||
# Use unicorn as the app server | ||
# gem 'unicorn' | ||
|
||
# Use Capistrano for deployment | ||
# gem 'capistrano', group: :development | ||
|
||
# Use debugger | ||
# gem 'debugger', group: [:development, :test] | ||
group :development, :test do | ||
gem 'guard' | ||
gem 'guard-livereload' | ||
gem 'guard-rspec' | ||
gem 'rspec-rails' | ||
gem 'capybara' | ||
gem 'factory_girl_rails' | ||
gem 'database_cleaner' | ||
gem 'shoulda-matchers' | ||
end |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# A sample Guardfile | ||
# More info at https://github.com/guard/guard#readme | ||
|
||
guard 'livereload' do | ||
watch(%r{app/views/.+\.(erb|haml|slim)$}) | ||
watch(%r{app/helpers/.+\.rb}) | ||
watch(%r{public/.+\.(css|js|html)}) | ||
watch(%r{config/locales/.+\.yml}) | ||
# Rails Assets Pipeline | ||
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" } | ||
end | ||
|
||
guard :rspec do | ||
watch(%r{^spec/.+_spec\.rb$}) | ||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | ||
watch('spec/spec_helper.rb') { "spec" } | ||
|
||
# Rails example | ||
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | ||
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | ||
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | ||
watch(%r{^spec/support/(.+)\.rb$}) { "spec" } | ||
watch('config/routes.rb') { "spec/routing" } | ||
watch('app/controllers/application_controller.rb') { "spec/controllers" } | ||
|
||
# Capybara features specs | ||
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" } | ||
|
||
# Turnip features and steps | ||
watch(%r{^spec/acceptance/(.+)\.feature$}) | ||
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } | ||
end | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,4 @@ | |
// | ||
//= require jquery | ||
//= require jquery_ujs | ||
//= require turbolinks | ||
//= require_tree . |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'spec_helper' | ||
|
||
describe 'account creation' do | ||
it 'allows user to create account' do | ||
visit root_path | ||
click_link 'Create Account' | ||
|
||
fill_in 'Name', with: 'Ryan' | ||
fill_in 'Email', with: 'bolandryanm@gmail.com' | ||
fill_in 'Password', with: 'pw' | ||
fill_in 'Password Confirmation', with: 'pw' | ||
fill_in 'Subdomain', with: 'test_subdomain' | ||
click_button 'Create Account' | ||
|
||
expect(page).to have_content('Signed up successfully') | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
ENV["RAILS_ENV"] ||= 'test' | ||
|
||
require File.expand_path("../../config/environment", __FILE__) | ||
require 'rspec/rails' | ||
require 'rspec/autorun' | ||
require 'database_cleaner' | ||
require 'capybara/rspec' | ||
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } | ||
|
||
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration) | ||
|
||
RSpec.configure do |config| | ||
config.include FactoryGirl::Syntax::Methods | ||
#config.include Devise::TestHelpers, type: :controller | ||
config.order = "random" | ||
|
||
config.before(:suite) do | ||
DatabaseCleaner.strategy = :transaction | ||
DatabaseCleaner.clean_with(:truncation) | ||
end | ||
|
||
config.before(:each) do | ||
DatabaseCleaner.start | ||
end | ||
|
||
config.after(:each) do | ||
DatabaseCleaner.clean | ||
end | ||
end |