Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 3c45fa6d92
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (45 sloc) 2.134 kB
# encoding: utf-8
require 'rubygems'
require 'bundler'
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
require 'rake'
require 'jeweler' do |gem|
# gem is a Gem::Specification... see for more options = "mockumentary"
gem.homepage = ""
gem.license = "MIT"
gem.summary = %Q{An ActiveRecord mocking framework, for making your copius BDD rails tests not quite so slow}
gem.description = <<-TEXT
With the happy proliferation of TDD, test suites are getting massive, and developer efficiency is dwindling
as we wait for our tests to pass. There is a big tradeoff between making unit test more integrationish (and therefore more reliable) vs.
making them very mocky, unity and fast. Mockumentary is a library for the later. It inspects the ActiveRecord universe and
makes a series of AR mockeries that approximate model without hitting the database, or making any assertions. The assertions,
they are still part of the developers job.
Mocumentary has two types of AR mockeries: One is used within the Rails universe. It uses introspection to derive association
and field information. The second is a static copy built from the first. This static version can be used outside the Rails
test universe in a suite faster than the speed of Rails environment load time.
Mocking isn't for everyone, so test-drive responsibly.
TEXT = ""
gem.authors = ["Kane Baccigalupi"]
# dependencies defined in Gemfile
require 'rspec/core'
require 'rspec/core/rake_task' do |spec|
spec.pattern = FileList['spec/mockery/**/*_spec.rb']
end do |spec|
spec.pattern = FileList['spec/mocksimile/**/*_spec.rb']
desc "Run all specs"
task :spec => [:mockery, :mocksimile]
task :default => :spec
Jump to Line
Something went wrong with that request. Please try again.