rspec 0.5.16 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/CHANGES +12 -0
  2. data/EXAMPLES.rd +2 -2
  3. data/examples/custom_method_spec.rb +2 -2
  4. data/examples/mocking_spec.rb +2 -2
  5. data/lib/spec/api/helper.rb +0 -6
  6. data/lib/spec/api/helper/diff.rb +1 -0
  7. data/lib/spec/api/helper/have_helper.rb +7 -23
  8. data/lib/spec/api/helper/should_helper.rb +23 -19
  9. data/lib/spec/api/helper/should_negator.rb +10 -18
  10. data/lib/spec/api/mocks/argument_expectation.rb +2 -2
  11. data/lib/spec/api/mocks/message_expectation.rb +28 -53
  12. data/lib/spec/api/mocks/mock.rb +4 -5
  13. data/lib/spec/api/sugar.rb +6 -23
  14. data/lib/spec/runner/instance_exec.rb +11 -5
  15. data/lib/spec/version.rb +2 -2
  16. data/test/spec/api/helper/arbitrary_predicate_test.rb +16 -16
  17. data/test/spec/api/helper/containment_test.rb +16 -16
  18. data/test/spec/api/helper/identity_test.rb +8 -8
  19. data/test/spec/api/helper/object_equality_test.rb +13 -13
  20. data/test/spec/api/helper/raising_test.rb +14 -14
  21. data/test/spec/api/helper/regex_matching_test.rb +4 -4
  22. data/test/spec/api/helper/should_have_test.rb +26 -20
  23. data/test/spec/api/helper/should_satisfy_test.rb +5 -5
  24. data/test/spec/api/helper/throwing_test.rb +7 -7
  25. data/test/spec/api/helper/true_false_special_case_test.rb +12 -12
  26. data/test/spec/api/helper/typing_test.rb +14 -14
  27. data/test/spec/api/mocks/mock_arg_constraints_test.rb +26 -20
  28. data/test/spec/api/mocks/mock_counts_test.rb +431 -0
  29. data/test/spec/api/mocks/mock_ordering_test.rb +61 -42
  30. data/test/spec/api/mocks/mock_test.rb +68 -230
  31. data/test/spec/api/sugar_test.rb +1 -1
  32. data/test/spec/runner/backtrace_tweaker_test.rb +2 -2
  33. data/test/spec/runner/context_runner_test.rb +4 -4
  34. data/test/spec/runner/context_test.rb +22 -22
  35. data/test/spec/runner/execution_context_test.rb +1 -1
  36. data/test/spec/runner/reporter_test.rb +6 -6
  37. data/test/spec/runner/specification_test.rb +30 -30
  38. data/test/test_classes.rb +13 -4
  39. metadata +6 -11
  40. data/lib/spec/api/helper/instance_helper.rb +0 -15
  41. data/lib/spec/api/helper/instance_negator.rb +0 -15
  42. data/lib/spec/api/helper/kind_helper.rb +0 -15
  43. data/lib/spec/api/helper/kind_negator.rb +0 -15
  44. data/lib/spec/api/helper/respond_helper.rb +0 -15
  45. data/lib/spec/api/helper/respond_negator.rb +0 -15
  46. data/test/spec/api/duck_type_test.rb +0 -19
@@ -1,15 +0,0 @@
1
- module Spec
2
-
3
- class RespondHelper < ShouldBase
4
-
5
- def initialize(target)
6
- @target = target
7
- end
8
-
9
- def to(expected)
10
- fail_with_message(default_message("should respond to", expected)) unless @target.respond_to? expected
11
- end
12
-
13
- end
14
-
15
- end
@@ -1,15 +0,0 @@
1
- module Spec
2
-
3
- class RespondNegator < ShouldBase
4
-
5
- def initialize(target)
6
- @target = target
7
- end
8
-
9
- def to(expected)
10
- fail_with_message(default_message("should not respond to", expected)) if @target.respond_to? expected
11
- end
12
-
13
- end
14
-
15
- end
@@ -1,19 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../test_helper'
2
-
3
- module Spec
4
- module Api
5
- class DuckTypeTest < Test::Unit::TestCase
6
-
7
- def test_should_talk_like_something_with_one_message_specified
8
- duck_type = DuckTypeArgConstraint.new(:length)
9
- assert duck_type.matches?([])
10
- end
11
-
12
- def test_should_talk_like_something_with_two_messages_specified
13
- duck_type = DuckTypeArgConstraint.new(:length, :empty?)
14
- assert duck_type.matches?([])
15
- end
16
-
17
- end
18
- end
19
- end