rspec 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/CHANGES +10 -2
  2. data/EXAMPLES.rd +34 -0
  3. data/README +1 -1
  4. data/Rakefile +23 -28
  5. data/bin/spec +0 -1
  6. data/doc/src/core_team.page +18 -9
  7. data/doc/src/tools/rails.page +71 -5
  8. data/doc/src/tools/rake.page +5 -8
  9. data/doc/src/tools/rcov.page +14 -5
  10. data/doc/src/tools/spec.page +33 -18
  11. data/doc/src/tutorials/meta.info +6 -1
  12. data/doc/src/tutorials/stack.rb +1 -1
  13. data/doc/src/tutorials/stack_01.page +2 -0
  14. data/doc/src/tutorials/stack_02.page +6 -4
  15. data/doc/src/tutorials/stack_03.page +7 -15
  16. data/doc/src/tutorials/stack_04.page +39 -78
  17. data/doc/src/tutorials/stack_05.page +1 -1
  18. data/doc/src/tutorials/stack_spec.rb +2 -18
  19. data/lib/spec/rake/rcov_verify.rb +2 -2
  20. data/lib/spec/rake/spectask.rb +4 -9
  21. data/lib/spec/runner.rb +1 -0
  22. data/lib/spec/runner/backtrace_tweaker.rb +2 -0
  23. data/lib/spec/runner/context.rb +7 -5
  24. data/lib/spec/runner/context_runner.rb +4 -4
  25. data/lib/spec/runner/kernel_ext.rb +1 -1
  26. data/lib/spec/runner/spec_matcher.rb +39 -0
  27. data/lib/spec/runner/specification.rb +3 -3
  28. data/lib/spec/version.rb +1 -1
  29. data/test/spec/api/helper/equality_test.rb +1 -1
  30. data/test/spec/runner/backtrace_tweaker_test.rb +15 -9
  31. data/test/spec/runner/context_matching_test.rb +35 -0
  32. data/test/spec/runner/context_runner_test.rb +16 -16
  33. data/test/spec/runner/context_test.rb +0 -21
  34. data/test/spec/runner/spec_matcher_test.rb +42 -0
  35. data/test/spec/runner/specification_test.rb +9 -4
  36. metadata +12 -10
  37. data/doc/reference/rspec reference.page +0 -0
  38. data/test/rcov/rcov_testtask.rb +0 -46
@@ -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