diff --git a/.gitignore b/.gitignore index 54cb8bb..da5a025 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ capybara-*.html /public/system/* /coverage/ /spec/tmp/* +*.gem +/spec/sample_app/log **.orig rerun.txt -pickle-email-*.html \ No newline at end of file +pickle-email-*.html diff --git a/spec/sample_app/init.rb b/spec/sample_app/init.rb index da55e3b..3cdd77c 100644 --- a/spec/sample_app/init.rb +++ b/spec/sample_app/init.rb @@ -1,17 +1,8 @@ require 'action_controller/railtie' require 'action_view/railtie' -# Database Configuration -ActiveRecord::Base.configurations = {'test' => { - :adapter => 'sqlite3', - :database => ':memory:'} -} -ActiveRecord::Base.establish_connection('test') - - # Dummy Rails Configurations app = Class.new(Rails::Application) - app.config.secret_token = '3b7cd727ee24e8444053437c36cc66c4' app.config.session_store :cookie_store, :key => '_myapp_session' app.config.active_support.deprecation = :log @@ -20,10 +11,12 @@ app.config.root = File.dirname(__FILE__) Rails.backtrace_cleaner.remove_silencers! app.initialize! + +# Routes app.routes.draw do resources :articles end -require 'models' -require 'controllers' +require "#{Paloma.root}/spec/sample_app/model" +require "#{Paloma.root}/spec/sample_app/controllers" diff --git a/spec/sample_app/log/development.log b/spec/sample_app/log/development.log deleted file mode 100644 index e69de29..0000000 diff --git a/spec/sample_app/model.rb b/spec/sample_app/model.rb index b508316..ccc486a 100644 --- a/spec/sample_app/model.rb +++ b/spec/sample_app/model.rb @@ -1,5 +1,11 @@ +# ActiveRecord Configuration +require 'active_record/railtie' +ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}} +ActiveRecord::Base.establish_connection('test') + + # Model -class Article +class Article < ActiveRecord::Base attr_accessible :title, :body end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index bfb02f7..f70c650 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,6 @@ -require 'rails/all' +require 'rails' require 'bundler/setup' Bundler.require - require 'sample_app/init' -require 'rspec/rails' +#require 'rspec/rails'