rspec 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +10 -2
- data/EXAMPLES.rd +34 -0
- data/README +1 -1
- data/Rakefile +23 -28
- data/bin/spec +0 -1
- data/doc/src/core_team.page +18 -9
- data/doc/src/tools/rails.page +71 -5
- data/doc/src/tools/rake.page +5 -8
- data/doc/src/tools/rcov.page +14 -5
- data/doc/src/tools/spec.page +33 -18
- data/doc/src/tutorials/meta.info +6 -1
- data/doc/src/tutorials/stack.rb +1 -1
- data/doc/src/tutorials/stack_01.page +2 -0
- data/doc/src/tutorials/stack_02.page +6 -4
- data/doc/src/tutorials/stack_03.page +7 -15
- data/doc/src/tutorials/stack_04.page +39 -78
- data/doc/src/tutorials/stack_05.page +1 -1
- data/doc/src/tutorials/stack_spec.rb +2 -18
- data/lib/spec/rake/rcov_verify.rb +2 -2
- data/lib/spec/rake/spectask.rb +4 -9
- data/lib/spec/runner.rb +1 -0
- data/lib/spec/runner/backtrace_tweaker.rb +2 -0
- data/lib/spec/runner/context.rb +7 -5
- data/lib/spec/runner/context_runner.rb +4 -4
- data/lib/spec/runner/kernel_ext.rb +1 -1
- data/lib/spec/runner/spec_matcher.rb +39 -0
- data/lib/spec/runner/specification.rb +3 -3
- data/lib/spec/version.rb +1 -1
- data/test/spec/api/helper/equality_test.rb +1 -1
- data/test/spec/runner/backtrace_tweaker_test.rb +15 -9
- data/test/spec/runner/context_matching_test.rb +35 -0
- data/test/spec/runner/context_runner_test.rb +16 -16
- data/test/spec/runner/context_test.rb +0 -21
- data/test/spec/runner/spec_matcher_test.rb +42 -0
- data/test/spec/runner/specification_test.rb +9 -4
- metadata +12 -10
- data/doc/reference/rspec reference.page +0 -0
- data/test/rcov/rcov_testtask.rb +0 -46
data/test/rcov/rcov_testtask.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
module RCov
|
2
|
-
class TestTask < Rake::TestTask
|
3
|
-
def define
|
4
|
-
lib_path = @libs.join(File::PATH_SEPARATOR)
|
5
|
-
desc "Run tests with rcov"
|
6
|
-
task 'test_with_rcov' do
|
7
|
-
run_code = ''
|
8
|
-
RakeFileUtils.verbose(@verbose) do
|
9
|
-
run_code =
|
10
|
-
case @loader
|
11
|
-
when :direct
|
12
|
-
"-e 'ARGV.each{|f| load f}'"
|
13
|
-
when :testrb
|
14
|
-
"-S testrb #{fix}"
|
15
|
-
when :rake
|
16
|
-
rake_loader
|
17
|
-
end
|
18
|
-
@ruby_opts.unshift( "-I#{lib_path}" )
|
19
|
-
@ruby_opts.unshift( "--exclude test.*.rb")
|
20
|
-
@ruby_opts.unshift( "--exclude lib.spec.sorted_find.rb")
|
21
|
-
@ruby_opts.unshift( "-w" ) if @warning
|
22
|
-
rcov @ruby_opts.join(" ") +
|
23
|
-
" \"#{run_code}\" " +
|
24
|
-
file_list.collect { |fn| "\"#{fn}\"" }.join(' ') +
|
25
|
-
" #{option_list}"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
self
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
module FileUtils
|
34
|
-
def rcov(*args,&block)
|
35
|
-
if Hash === args.last
|
36
|
-
options = args.pop
|
37
|
-
else
|
38
|
-
options = {}
|
39
|
-
end
|
40
|
-
if args.length > 1 then
|
41
|
-
sh(*(['rcov'] + args + [options]), &block)
|
42
|
-
else
|
43
|
-
sh("rcov #{args}", options, &block)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|