Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

We'll want to write some specs

  • Loading branch information...
commit 3483dddc3a93c4e5f451080f54052fc8152f72fe 1 parent 18242a9
@sporkd authored
View
2  .rspec
@@ -0,0 +1,2 @@
+--color
+--format documentation
View
1  Gemfile
@@ -1,3 +1,2 @@
source "http://rubygems.org"
-
gemspec
View
8 Rakefile
@@ -1 +1,9 @@
require "bundler/gem_tasks"
+require "rspec/core/rake_task"
+
+desc "Run all specs in spec directory"
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = "spec/**/*_spec.rb"
+end
+
+task :default => :spec
View
8 spec/metastamp_spec.rb
@@ -0,0 +1,8 @@
+#encoding: utf-8
+require "spec_helper"
+
+module Mongoid
+ describe Metastamp do
+ pending "helper method"
+ end
+end
View
3  spec/models/event.rb
@@ -0,0 +1,3 @@
+class Event
+ include Mongoid::Document
+end
View
19 spec/spec_helper.rb
@@ -0,0 +1,19 @@
+require "rubygems"
+require "bundler/setup"
+
+require "rspec"
+
+require "mongoid"
+require "mongoid/metastamp"
+
+Mongoid.configure do |config|
+ config.master = Mongo::Connection.new.db("mongoid_metastamp_test")
+end
+
+Dir["#{File.dirname(__FILE__)}/models/*.rb"].each { |f| require f }
+
+RSpec.configure do |c|
+ c.before(:each) do
+ Mongoid.master.collections.select {|c| c.name !~ /system/ }.each(&:remove)
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.