public
Description: Tiny Ruby mock object library inspired by JMock
Homepage: http://dev.sanityinc.com/mockr
Clone URL: git://github.com/purcell/mockr.git
Click here to lend your support to: mockr and make a donation at www.pledgie.com !
mockr / Rakefile
100644 62 lines (49 sloc) 1.623 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
 
# Meta -------------------------------
PKG_VERSION = "0.1"
RUBYFORGE_PROJECT = "mockr"
RUBYFORGE_USER = "purcell"
 
 
# Coding -------------------------------
desc 'Run Tests'
Rake::TestTask.new :test do |t|
  t.test_files = FileList['test/*.rb']
end
 
 
# Sharing -------------------------------
PKG_FILES = FileList["lib/*.rb", "test/*.rb"]
 
spec = Gem::Specification.new do |s|
  s.platform = Gem::Platform::RUBY
  s.summary = "Easy Mock Objects for Ruby."
  s.name = RUBYFORGE_PROJECT
  s.version = PKG_VERSION
  s.requirements << 'none'
  s.require_path = 'lib'
  s.files = PKG_FILES
  s.has_rdoc = true
  s.description = <<-EOF
MockR is a tiny mock object library inspired by JMock. Main selling points:
* Natural and unintrusive syntax
* Supports the distinction between mocks and stubs
* Constraint-based mechanism for matching call parameters
See http://mockr.sanityinc.com/ for more info.
EOF
end
 
Rake::GemPackageTask.new(spec) do |pkg|
  pkg.need_zip = true
  pkg.need_tar = true
end
 
Rake::RDocTask.new { |rdoc|
  rdoc.rdoc_dir = 'doc'
  rdoc.title = "MockR -- Easy Mock Objects for Ruby"
  rdoc.options << '--line-numbers' << '--inline-source' << '--accessor' << 'cattr_accessor=object'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/*.rb')
}
 
desc "Publish the API documentation"
task :publish => [:rdoc] do
  Rake::RubyForgePublisher.new(RUBYFORGE_PROJECT, RUBYFORGE_USER).upload
end
 
task :dist => [:test, :rdoc, :package]
 
task :default => [:test]