Rakefile 1.47 KB
Newer Older
1
def dump_load_path
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    puts $LOAD_PATH.join("\n")
    found = nil
    $LOAD_PATH.each do |path|
        if File.exists?(File.join(path, "rspec"))
            puts "Found rspec in #{path}"
            if File.exists?(File.join(path, "rspec", "core"))
                puts "Found core"
                if File.exists?(File.join(path, "rspec", "core", "rake_task"))
                    puts "Found rake_task"
                    found = path
                else
                    puts "!! no rake_task"
                end
            else
                puts "!!! no core"
            end
18
19
        end
    end
20
21
22
23
24
    if found.nil?
        puts "Didn't find rspec/core/rake_task anywhere"
    else
        puts "Found in #{path}"
    end
25
end
26

27
gem 'json', '~> 2.5'
28

29
gem 'bundler', '~> 2.2'
30
31
require 'bundler'

32
gem 'rake', '~> 13.0'
33
require 'rake/clean'
34
35
require 'rake/testtask'

36

37
38
39
40
41
42
43
44
45
46
47
require 'cucumber'
require 'cucumber/rake/task'
gem 'rdoc' # we need the installed RDoc gem, not the system one
require 'rdoc/task'

include Rake::DSL

Bundler::GemHelper.install_tasks


Rake::TestTask.new do |t|
48
    t.pattern = 'test/tc_*.rb'
49
50
51
52
53
54
end


CUKE_RESULTS = 'results.html'
CLEAN << CUKE_RESULTS
Cucumber::Rake::Task.new(:features) do |t|
55
56
    t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
    t.fork = false
57
58
59
end

Rake::RDocTask.new do |rd|
60
61
62
63

    rd.main = "README.rdoc"

    rd.rdoc_files.include("README.rdoc", "lib/**/*.rb", "bin/**/*")
64
65
end

66
task :default => [:test, :features]
67