Permalink
Browse files

Merge branch 'spec-activerecord' of github.com:winton/gem_template

Conflicts:
	require.rb
	spec/spec_helper.rb
  • Loading branch information...
winton committed Jun 9, 2010
2 parents 4b41800 + a3be535 commit 57b636c371c64ac48dc75c3cbc37674234b3814b
Showing with 38 additions and 1 deletion.
  1. +2 −0 .gitignore
  2. +6 −0 log/development.log
  3. +8 −1 require.rb
  4. +10 −0 spec/Rakefile
  5. +6 −0 spec/config/database.yml.example
  6. +6 −0 spec/spec_helper.rb
View
@@ -3,4 +3,6 @@
*.gemspec
coverage
pkg
+spec/config/database.yml
+spec/log
tmp
View
@@ -0,0 +1,6 @@
+ SQL (0.2ms) SET SQL_AUTO_IS_NULL=0
+ User Load (59.6ms) SELECT * FROM `users` ORDER BY users.id DESC LIMIT 1
+ User Columns (21.6ms) SHOW FIELDS FROM `users`
+ SQL (0.3ms) SET SQL_AUTO_IS_NULL=0
+ SQL (0.3ms) SHOW TABLES
+ User Columns (13.0ms) SHOW FIELDS FROM `users`
View
@@ -29,14 +29,21 @@
end
rakefile do
+ gem(:active_wrapper)
gem(:rake) { require 'rake/gempackagetask' }
gem(:rspec) { require 'spec/rake/spectask' }
require 'require/tasks'
end
spec_helper do
+ gem(:active_wrapper)
require 'require/spec_helper'
require 'lib/periodic_counter'
require 'pp'
end
-end
+
+ spec_rakefile do
+ gem(:rake)
+ gem(:active_wrapper) { require 'active_wrapper/tasks' }
+ end
+end
View
@@ -0,0 +1,10 @@
+require File.expand_path("#{File.dirname(__FILE__)}/../require")
+Require.spec_rakefile!
+
+begin
+ ActiveWrapper::Tasks.new(
+ :base => File.dirname(__FILE__),
+ :env => ENV['ENV']
+ )
+rescue Exception
+end
@@ -0,0 +1,6 @@
+test:
+ adapter: mysql
+ database: gem_template
+ username: root
+ password:
+ host: localhost
View
@@ -3,3 +3,9 @@
Spec::Runner.configure do |config|
end
+
+$db, $log, $mail = ActiveWrapper.new(
+ :base => File.dirname(__FILE__),
+ :env => 'test'
+)
+$db.establish_connection

0 comments on commit 57b636c

Please sign in to comment.