Skip to content

Commit

Permalink
Trying to get specs to boot.
Browse files Browse the repository at this point in the history
  • Loading branch information
benhutton committed Oct 20, 2010
1 parent b65de41 commit 03d64cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
9 changes: 5 additions & 4 deletions remarkable_rails/spec/application/application.rb
Expand Up @@ -7,9 +7,10 @@ class ApplicationController < ActionController::Base
class Task; end

# Define routes
ActionController::Routing::Routes.draw do |map|
map.resources :projects, :has_many => :tasks
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
Rails.application.routes.draw do
resources :projects do
resources :tasks
end
match ':controller(/:action(/:id(.:format)))'
end

22 changes: 9 additions & 13 deletions remarkable_rails/spec/spec_helper.rb
@@ -1,7 +1,7 @@
require 'rubygems'

RAILS_ENV = 'test'
RAILS_VERSION = ENV['RAILS_VERSION'] || '2.3.5'
RAILS_VERSION = ENV['RAILS_VERSION'] || '3.0.0'

# Load Rails
gem 'activesupport', RAILS_VERSION
Expand All @@ -18,26 +18,22 @@

# Load Remarkable core on place to avoid gem to be loaded
dir = File.dirname(__FILE__)
require File.join(dir, '..', '..', 'remarkable', 'lib', 'remarkable')
# require File.join(dir, '..', '..', 'remarkable', 'lib', 'remarkable')

# Add spec/application to load path and set view_paths
RAILS_ROOT = File.join(dir, 'application')
$:.unshift(RAILS_ROOT)
# RAILS_ROOT = File.join(dir, 'application')
# $:.unshift(RAILS_ROOT)

ActionController::Base.view_paths = RAILS_ROOT
require File.join(RAILS_ROOT, 'application')
require File.join(RAILS_ROOT, 'tasks_controller')
# ActionController::Base.view_paths = RAILS_ROOT
# require File.join(RAILS_ROOT, 'application')
# require File.join(RAILS_ROOT, 'tasks_controller')

# Load Remarkable Rails
require File.join(dir, 'functional_builder')

# Load spec-rails
if ENV['RSPEC_VERSION']
gem 'rspec-rails', ENV['RSPEC_VERSION']
else
gem 'rspec-rails'
end
require 'spec/rails'
require 'rspec'
require 'rspec/rails'

require File.join(dir, '..', 'lib', 'remarkable_rails')

Expand Down

0 comments on commit 03d64cf

Please sign in to comment.