Initial commit to database_cleaner.

This commit is contained in:
Ben Mabey 2009-02-26 21:42:20 -07:00
commit 00299245c8
10 changed files with 111 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.sw?
.DS_Store
coverage

20
LICENSE Normal file
View File

@ -0,0 +1,20 @@
Copyright (c) 2008 Ben Mabey
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

7
README Normal file
View File

@ -0,0 +1,7 @@
database_cleaner================
Description goes here.
COPYRIGHT
=========
Copyright (c) 2008 Ben Mabey. See LICENSE for details.

45
Rakefile Normal file
View File

@ -0,0 +1,45 @@
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "database_cleaner"
s.summary = %Q{TODO}
s.email = "ben@benmabey.com"
s.homepage = "http://github.com/bmabey/database_cleaner"
s.description = "TODO"
s.authors = ["Ben Mabey"]
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'database_cleaner'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |t|
t.libs << 'lib' << 'spec'
t.spec_files = FileList['spec/**/*_spec.rb']
end
Spec::Rake::SpecTask.new(:rcov) do |t|
t.libs << 'lib' << 'spec'
t.spec_files = FileList['spec/**/*_spec.rb']
t.rcov = true
end
begin
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features)
rescue LoadError
puts "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
end
task :default => :spec

View File

@ -0,0 +1,9 @@
Feature: something something
In order to something something
A user something something
something something something
Scenario: something something
Given inspiration
When I create a sweet new gem
Then everyone should see how awesome I am

View File

11
features/support/env.rb Normal file
View File

@ -0,0 +1,11 @@
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
require 'database_cleaner'
require 'spec/expectations'
require 'test/unit/assertions'
World do |world|
world
end

0
lib/database_cleaner.rb Normal file
View File

View File

@ -0,0 +1,7 @@
require File.dirname(__FILE__) + '/spec_helper'
describe "DatabaseCleaner" do
it "fails" do
fail "hey buddy, you should probably rename this file and start specing for real"
end
end

9
spec/spec_helper.rb Normal file
View File

@ -0,0 +1,9 @@
require 'spec'
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'database_cleaner'
Spec::Runner.configure do |config|
end