rspec 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/CHANGES +28 -3
  2. data/EXAMPLES.rd +2 -16
  3. data/README +5 -2
  4. data/Rakefile +8 -4
  5. data/bin/spec +1 -0
  6. data/examples/custom_formatter.rb +2 -1
  7. data/examples/helper_method_spec.rb +12 -0
  8. data/examples/{mocking_spec.rb → mocking_example.rb} +0 -0
  9. data/examples/{bdd_framework_spec.rb → predicate_example.rb} +0 -0
  10. data/examples/stubbing_example.rb +28 -0
  11. data/lib/spec.rb +2 -1
  12. data/lib/spec/expectations.rb +7 -0
  13. data/lib/spec/expectations/diff.rb +56 -0
  14. data/lib/spec/expectations/exceptions.rb +6 -0
  15. data/lib/spec/expectations/expectations.rb +19 -0
  16. data/lib/spec/expectations/have_helper.rb +41 -0
  17. data/lib/spec/expectations/helper.rb +4 -0
  18. data/lib/spec/expectations/should_base.rb +52 -0
  19. data/lib/spec/expectations/should_helper.rb +93 -0
  20. data/lib/spec/expectations/should_negator.rb +71 -0
  21. data/lib/spec/{api → expectations}/sugar.rb +8 -8
  22. data/lib/spec/mocks.rb +5 -0
  23. data/lib/spec/{api/mocks → mocks}/argument_expectation.rb +1 -1
  24. data/lib/spec/{api → mocks}/exceptions.rb +3 -5
  25. data/lib/spec/{api/mocks → mocks}/message_expectation.rb +15 -9
  26. data/lib/spec/{api/mocks → mocks}/mock.rb +44 -26
  27. data/lib/spec/{api/mocks → mocks}/order_group.rb +1 -1
  28. data/lib/spec/runner/backtrace_tweaker.rb +4 -1
  29. data/lib/spec/runner/execution_context.rb +13 -4
  30. data/lib/spec/runner/formatter/base_text_formatter.rb +26 -13
  31. data/lib/spec/runner/formatter/html_formatter.rb +1 -1
  32. data/lib/spec/runner/option_parser.rb +6 -2
  33. data/lib/spec/runner/specification.rb +2 -2
  34. data/lib/spec/test_to_spec/ruby2ruby.rb +1 -1
  35. data/lib/spec/version.rb +1 -1
  36. data/test/spec/expectations/arbitrary_operator_test.rb +55 -0
  37. data/test/spec/expectations/arbitrary_predicate_test.rb +163 -0
  38. data/test/spec/{api/helper → expectations}/containment_test.rb +2 -2
  39. data/test/spec/expectations/diff_test.rb +62 -0
  40. data/test/spec/{api/helper → expectations}/identity_test.rb +2 -2
  41. data/test/spec/{api/helper → expectations}/object_equality_test.rb +2 -2
  42. data/test/spec/{api/helper → expectations}/raising_test.rb +5 -5
  43. data/test/spec/{api/helper → expectations}/regex_matching_test.rb +6 -6
  44. data/test/spec/{api/helper → expectations}/should_have_test.rb +11 -2
  45. data/test/spec/{api/helper → expectations}/should_satisfy_test.rb +2 -4
  46. data/test/spec/{api → expectations}/sugar_test.rb +8 -8
  47. data/test/spec/expectations/supported_symbols_test.rb +33 -0
  48. data/test/spec/{api/helper → expectations}/throwing_test.rb +2 -2
  49. data/test/spec/{api/helper → expectations}/true_false_special_case_test.rb +2 -2
  50. data/test/spec/{api/helper → expectations}/typing_test.rb +2 -2
  51. data/test/spec/{api/mocks → mocks}/mock_arg_constraints_test.rb +4 -4
  52. data/test/spec/{api/mocks → mocks}/mock_counts_test.rb +2 -2
  53. data/test/spec/{api/mocks → mocks}/mock_ordering_test.rb +2 -2
  54. data/test/spec/{api/mocks → mocks}/mock_test.rb +22 -7
  55. data/test/spec/{api/mocks → mocks}/null_object_test.rb +8 -2
  56. data/test/spec/runner/backtrace_tweaker_test.rb +21 -19
  57. data/test/spec/runner/context_matching_test.rb +2 -2
  58. data/test/spec/runner/context_runner_test.rb +6 -6
  59. data/test/spec/runner/context_test.rb +1 -1
  60. data/test/spec/runner/execution_context_test.rb +22 -5
  61. data/test/spec/runner/formatter/failure_dump_test.rb +7 -7
  62. data/test/spec/runner/option_parser_test.rb +20 -0
  63. data/test/spec/runner/reporter_test.rb +3 -3
  64. data/test/spec/runner/specification_test.rb +3 -3
  65. data/test/spec/test_to_spec/sexp_transformer_assertion_test.rb +4 -4
  66. data/test/spec/test_to_spec/sexp_transformer_test.rb +1 -1
  67. data/test/spec/test_to_spec/testfiles/test_unit_api_test.rb +2 -2
  68. data/test/test_classes.rb +21 -1
  69. data/test/test_helper.rb +1 -1
  70. data/vendor/selenium/README.txt +23 -0
  71. data/vendor/selenium/find_rspecs_home_page.rb +23 -0
  72. data/vendor/selenium/rspec_selenium.rb +33 -0
  73. data/vendor/watir/README.txt +32 -0
  74. data/vendor/watir/find_rspecs_home_page.rb +21 -0
  75. data/vendor/watir/find_rspecs_home_page.txt +15 -0
  76. data/vendor/watir/rspec_watir.rb +45 -0
  77. metadata +52 -41
  78. data/examples/airport_spec.rb +0 -33
  79. data/examples/custom_method_spec.rb +0 -24
  80. data/examples/sugar_spec.rb +0 -14
  81. data/lib/spec/api.rb +0 -8
  82. data/lib/spec/api/expectations.rb +0 -17
  83. data/lib/spec/api/helper.rb +0 -4
  84. data/lib/spec/api/helper/diff.rb +0 -54
  85. data/lib/spec/api/helper/have_helper.rb +0 -40
  86. data/lib/spec/api/helper/should_base.rb +0 -31
  87. data/lib/spec/api/helper/should_helper.rb +0 -93
  88. data/lib/spec/api/helper/should_negator.rb +0 -72
  89. data/test/spec/api/helper/arbitrary_predicate_test.rb +0 -112
  90. data/test/spec/api/helper/diff_test.rb +0 -60
@@ -1,60 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../../test_helper'
2
-
3
- module Spec
4
- class DiffTest < Test::Unit::TestCase
5
- def test_should_output_unified_diff_of_two_strings
6
- expected = <<-EOF
7
- foo
8
- bar
9
- zap
10
- this
11
- is
12
- soo
13
- very
14
- very
15
- equal
16
- insert
17
- a
18
- line
19
- EOF
20
-
21
- actual = <<-EOF
22
- foo
23
- zap
24
- bar
25
- this
26
- is
27
- soo
28
- very
29
- very
30
- equal
31
- insert
32
- a
33
- another
34
- line
35
- EOF
36
-
37
- expected_diff = <<-EOF
38
-
39
-
40
- @@ -1,6 +1,6 @@
41
- foo
42
- -bar
43
- zap
44
- +bar
45
- this
46
- is
47
- soo
48
- @@ -9,5 +9,6 @@
49
- equal
50
- insert
51
- a
52
- +another
53
- line
54
- EOF
55
-
56
- diff = ShouldBase.new.diff_as_string(expected, actual)
57
- assert_equal expected_diff, diff
58
- end
59
- end
60
- end