Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[gem_template/spec-activerecord] First commit

  • Loading branch information...
commit ffe82f2522000b17fa09c8be188a7c2b5721b12e 1 parent 4ab38af
@winton authored
View
2  .gitignore
@@ -2,4 +2,6 @@
*.gem
coverage
pkg
+spec/db/config/database.yml
+spec/db/log
tmp
View
1  gemspec.rb
@@ -7,6 +7,7 @@
s.homepage = "http://github.com/winton/#{GEM_NAME}"
s.summary = ""
# == CONFIGURE ==
+ s.add_dependency('winton-active_wrapper', '>=0.1.2')
s.executables << GEM_NAME
s.extensions << "install"
s.extra_rdoc_files = [ "README.markdown" ]
View
12 spec/Rakefile
@@ -0,0 +1,12 @@
+require 'rubygems'
+require 'rake'
+
+begin
+ require 'active_wrapper/tasks'
+
+ ActiveWrapper::Tasks.new(
+ :base => File.dirname(__FILE__),
+ :env => ENV['ENV']
+ )
+rescue Exception
+end
View
6 spec/config/database.yml.example
@@ -0,0 +1,6 @@
+test:
+ adapter: mysql
+ database: gem_template
+ username: root
+ password:
+ host: localhost
View
10 spec/spec_helper.rb
@@ -1,11 +1,21 @@
$TESTING=true
SPEC = File.dirname(__FILE__)
+
+$:.unshift SPEC
$:.unshift File.expand_path("#{SPEC}/../lib")
require 'gem_template'
require 'pp'
+require 'rubygems'
+require 'active_wrapper'
+
Spec::Runner.configure do |config|
+ $db, $log, $mail = ActiveWrapper.new(
+ :base => File.dirname(__FILE__),
+ :env => ENV['ENV']
+ )
+ $db.establish_connection
end
# For use with rspec textmate bundle
Please sign in to comment.
Something went wrong with that request. Please try again.