Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
cleanup spec helper re: #22
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Sonnek committed Nov 28, 2011
1 parent dcf0735 commit ca62a01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
8 changes: 1 addition & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
require 'bundler'
Bundler::GemHelper.install_tasks
require "bundler/gem_tasks"

begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
load 'rails/tasks/engine.rake'

Expand Down
7 changes: 0 additions & 7 deletions spec/setup_database.rb

This file was deleted.

10 changes: 5 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
spec_root = File.expand_path('..', __FILE__)
require File.expand_path("dummy/config/environment.rb", spec_root)

require 'pry'
require 'rspec/rails'
require 'shoulda-matchers'

require 'factory_girl_rspec'
FactoryGirl.definition_file_paths = [
File.join(File.dirname(__FILE__), 'factories')
]
FactoryGirl.definition_file_paths = [File.join(spec_root, 'factories')]
FactoryGirl.find_definitions

ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
Expand All @@ -27,3 +25,5 @@
# see http://stackoverflow.com/questions/4401539/rspec-2-how-to-render-views-by-default-for-all-controller-specs
config.render_views
end

ActiveRecord::Migrator.migrate(File.expand_path("dummy/db/migrate/", spec_root))

0 comments on commit ca62a01

Please sign in to comment.