mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
updated .gitignore. working sample_app
This commit is contained in:
parent
51ec57e101
commit
64de5824ef
5 changed files with 16 additions and 16 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -11,6 +11,8 @@ capybara-*.html
|
||||||
/public/system/*
|
/public/system/*
|
||||||
/coverage/
|
/coverage/
|
||||||
/spec/tmp/*
|
/spec/tmp/*
|
||||||
|
*.gem
|
||||||
|
/spec/sample_app/log
|
||||||
**.orig
|
**.orig
|
||||||
rerun.txt
|
rerun.txt
|
||||||
pickle-email-*.html
|
pickle-email-*.html
|
|
@ -1,17 +1,8 @@
|
||||||
require 'action_controller/railtie'
|
require 'action_controller/railtie'
|
||||||
require 'action_view/railtie'
|
require 'action_view/railtie'
|
||||||
|
|
||||||
# Database Configuration
|
|
||||||
ActiveRecord::Base.configurations = {'test' => {
|
|
||||||
:adapter => 'sqlite3',
|
|
||||||
:database => ':memory:'}
|
|
||||||
}
|
|
||||||
ActiveRecord::Base.establish_connection('test')
|
|
||||||
|
|
||||||
|
|
||||||
# Dummy Rails Configurations
|
# Dummy Rails Configurations
|
||||||
app = Class.new(Rails::Application)
|
app = Class.new(Rails::Application)
|
||||||
|
|
||||||
app.config.secret_token = '3b7cd727ee24e8444053437c36cc66c4'
|
app.config.secret_token = '3b7cd727ee24e8444053437c36cc66c4'
|
||||||
app.config.session_store :cookie_store, :key => '_myapp_session'
|
app.config.session_store :cookie_store, :key => '_myapp_session'
|
||||||
app.config.active_support.deprecation = :log
|
app.config.active_support.deprecation = :log
|
||||||
|
@ -20,10 +11,12 @@ app.config.root = File.dirname(__FILE__)
|
||||||
Rails.backtrace_cleaner.remove_silencers!
|
Rails.backtrace_cleaner.remove_silencers!
|
||||||
app.initialize!
|
app.initialize!
|
||||||
|
|
||||||
|
|
||||||
|
# Routes
|
||||||
app.routes.draw do
|
app.routes.draw do
|
||||||
resources :articles
|
resources :articles
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
require 'models'
|
require "#{Paloma.root}/spec/sample_app/model"
|
||||||
require 'controllers'
|
require "#{Paloma.root}/spec/sample_app/controllers"
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
|
# ActiveRecord Configuration
|
||||||
|
require 'active_record/railtie'
|
||||||
|
ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
|
||||||
|
ActiveRecord::Base.establish_connection('test')
|
||||||
|
|
||||||
|
|
||||||
# Model
|
# Model
|
||||||
class Article
|
class Article < ActiveRecord::Base
|
||||||
attr_accessible :title, :body
|
attr_accessible :title, :body
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
require 'rails/all'
|
require 'rails'
|
||||||
require 'bundler/setup'
|
require 'bundler/setup'
|
||||||
Bundler.require
|
Bundler.require
|
||||||
|
|
||||||
|
|
||||||
require 'sample_app/init'
|
require 'sample_app/init'
|
||||||
require 'rspec/rails'
|
#require 'rspec/rails'
|
||||||
|
|
Loading…
Reference in a new issue