rr 1.1.1.rc1 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/CREDITS.md +61 -0
  3. data/VERSION +1 -1
  4. data/doc/01_test_double.md +16 -0
  5. data/doc/02_syntax_comparison.md +96 -0
  6. data/doc/03_api_overview.md +616 -0
  7. data/rr.gemspec +6 -6
  8. metadata +12 -230
  9. data/spec/global_helper.rb +0 -53
  10. data/spec/spec.opts +0 -2
  11. data/spec/suite.rb +0 -107
  12. data/spec/suites/common/adapter_integration_tests.rb +0 -160
  13. data/spec/suites/common/adapter_tests.rb +0 -43
  14. data/spec/suites/common/rails_integration_tests.rb +0 -106
  15. data/spec/suites/common/test_unit_tests.rb +0 -21
  16. data/spec/suites/minitest/integration/minitest_test.rb +0 -13
  17. data/spec/suites/minitest/test_helper.rb +0 -7
  18. data/spec/suites/minitest_4/integration/minitest_test.rb +0 -13
  19. data/spec/suites/minitest_4/test_helper.rb +0 -7
  20. data/spec/suites/rspec_1/helper.rb +0 -24
  21. data/spec/suites/rspec_1/integration/rspec_1_spec.rb +0 -77
  22. data/spec/suites/rspec_1/integration/test_unit_1_spec.rb +0 -41
  23. data/spec/suites/rspec_1/integration/test_unit_2_spec.rb +0 -57
  24. data/spec/suites/rspec_1/spec_helper.rb +0 -3
  25. data/spec/suites/rspec_1_rails_2/integration/test_unit_1_rails_2_spec.rb +0 -53
  26. data/spec/suites/rspec_1_rails_2/integration/test_unit_2_rails_2_spec.rb +0 -57
  27. data/spec/suites/rspec_1_rails_2/spec_helper.rb +0 -3
  28. data/spec/suites/rspec_2/functional/any_instance_of_spec.rb +0 -47
  29. data/spec/suites/rspec_2/functional/dont_allow_spec.rb +0 -12
  30. data/spec/suites/rspec_2/functional/dsl_spec.rb +0 -13
  31. data/spec/suites/rspec_2/functional/instance_of_spec.rb +0 -14
  32. data/spec/suites/rspec_2/functional/mock_spec.rb +0 -241
  33. data/spec/suites/rspec_2/functional/proxy_spec.rb +0 -136
  34. data/spec/suites/rspec_2/functional/spy_spec.rb +0 -41
  35. data/spec/suites/rspec_2/functional/strong_spec.rb +0 -79
  36. data/spec/suites/rspec_2/functional/stub_spec.rb +0 -190
  37. data/spec/suites/rspec_2/functional/wildcard_matchers_spec.rb +0 -128
  38. data/spec/suites/rspec_2/helper.rb +0 -27
  39. data/spec/suites/rspec_2/integration/minitest_4_spec.rb +0 -57
  40. data/spec/suites/rspec_2/integration/minitest_spec.rb +0 -57
  41. data/spec/suites/rspec_2/integration/rspec_2_spec.rb +0 -126
  42. data/spec/suites/rspec_2/integration/test_unit_200_spec.rb +0 -57
  43. data/spec/suites/rspec_2/integration/test_unit_2_spec.rb +0 -57
  44. data/spec/suites/rspec_2/spec_helper.rb +0 -3
  45. data/spec/suites/rspec_2/support/matchers/wildcard_matcher_matchers.rb +0 -32
  46. data/spec/suites/rspec_2/support/shared_examples/space.rb +0 -13
  47. data/spec/suites/rspec_2/support/shared_examples/times_called_expectation.rb +0 -9
  48. data/spec/suites/rspec_2/unit/adapters/rr_methods/double_creators_spec.rb +0 -135
  49. data/spec/suites/rspec_2/unit/adapters/rr_methods/space_spec.rb +0 -101
  50. data/spec/suites/rspec_2/unit/adapters/rr_methods/wildcard_matchers_spec.rb +0 -69
  51. data/spec/suites/rspec_2/unit/core_ext/array_spec.rb +0 -39
  52. data/spec/suites/rspec_2/unit/core_ext/enumerable_spec.rb +0 -81
  53. data/spec/suites/rspec_2/unit/core_ext/hash_spec.rb +0 -55
  54. data/spec/suites/rspec_2/unit/core_ext/range_spec.rb +0 -41
  55. data/spec/suites/rspec_2/unit/core_ext/regexp_spec.rb +0 -41
  56. data/spec/suites/rspec_2/unit/double_definitions/child_double_definition_create_spec.rb +0 -114
  57. data/spec/suites/rspec_2/unit/double_definitions/double_definition_create_blank_slate_spec.rb +0 -93
  58. data/spec/suites/rspec_2/unit/double_definitions/double_definition_create_spec.rb +0 -446
  59. data/spec/suites/rspec_2/unit/errors/rr_error_spec.rb +0 -67
  60. data/spec/suites/rspec_2/unit/expectations/any_argument_expectation_spec.rb +0 -48
  61. data/spec/suites/rspec_2/unit/expectations/anything_argument_equality_expectation_spec.rb +0 -14
  62. data/spec/suites/rspec_2/unit/expectations/argument_equality_expectation_spec.rb +0 -135
  63. data/spec/suites/rspec_2/unit/expectations/boolean_argument_equality_expectation_spec.rb +0 -30
  64. data/spec/suites/rspec_2/unit/expectations/hash_including_argument_equality_expectation_spec.rb +0 -82
  65. data/spec/suites/rspec_2/unit/expectations/satisfy_argument_equality_expectation_spec.rb +0 -61
  66. data/spec/suites/rspec_2/unit/expectations/times_called_expectation/any_times_matcher_spec.rb +0 -22
  67. data/spec/suites/rspec_2/unit/expectations/times_called_expectation/at_least_matcher_spec.rb +0 -37
  68. data/spec/suites/rspec_2/unit/expectations/times_called_expectation/at_most_matcher_spec.rb +0 -43
  69. data/spec/suites/rspec_2/unit/expectations/times_called_expectation/integer_matcher_spec.rb +0 -58
  70. data/spec/suites/rspec_2/unit/expectations/times_called_expectation/proc_matcher_spec.rb +0 -35
  71. data/spec/suites/rspec_2/unit/expectations/times_called_expectation/range_matcher_spec.rb +0 -39
  72. data/spec/suites/rspec_2/unit/hash_with_object_id_key_spec.rb +0 -88
  73. data/spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb +0 -545
  74. data/spec/suites/rspec_2/unit/injections/double_injection/double_injection_verify_spec.rb +0 -32
  75. data/spec/suites/rspec_2/unit/integrations/rspec/invocation_matcher_spec.rb +0 -297
  76. data/spec/suites/rspec_2/unit/integrations/rspec_spec.rb +0 -85
  77. data/spec/suites/rspec_2/unit/proc_from_block_spec.rb +0 -14
  78. data/spec/suites/rspec_2/unit/rr_spec.rb +0 -28
  79. data/spec/suites/rspec_2/unit/space_spec.rb +0 -595
  80. data/spec/suites/rspec_2/unit/spy_verification_spec.rb +0 -133
  81. data/spec/suites/rspec_2/unit/times_called_matchers/any_times_matcher_spec.rb +0 -46
  82. data/spec/suites/rspec_2/unit/times_called_matchers/at_least_matcher_spec.rb +0 -54
  83. data/spec/suites/rspec_2/unit/times_called_matchers/at_most_matcher_spec.rb +0 -69
  84. data/spec/suites/rspec_2/unit/times_called_matchers/integer_matcher_spec.rb +0 -69
  85. data/spec/suites/rspec_2/unit/times_called_matchers/proc_matcher_spec.rb +0 -54
  86. data/spec/suites/rspec_2/unit/times_called_matchers/range_matcher_spec.rb +0 -75
  87. data/spec/suites/rspec_2/unit/times_called_matchers/times_called_matcher_spec.rb +0 -117
  88. data/spec/suites/rspec_2/unit/wildcard_matchers/anything_spec.rb +0 -33
  89. data/spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb +0 -45
  90. data/spec/suites/rspec_2/unit/wildcard_matchers/duck_type_spec.rb +0 -64
  91. data/spec/suites/rspec_2/unit/wildcard_matchers/hash_including_spec.rb +0 -64
  92. data/spec/suites/rspec_2/unit/wildcard_matchers/is_a_spec.rb +0 -55
  93. data/spec/suites/rspec_2/unit/wildcard_matchers/numeric_spec.rb +0 -46
  94. data/spec/suites/rspec_2/unit/wildcard_matchers/satisfy_spec.rb +0 -57
  95. data/spec/suites/rspec_2_rails_3/integration/minitest_4_rails_3_spec.rb +0 -66
  96. data/spec/suites/rspec_2_rails_3/integration/test_unit_200_rails_3_spec.rb +0 -66
  97. data/spec/suites/rspec_2_rails_3/integration/test_unit_2_rails_3_spec.rb +0 -66
  98. data/spec/suites/rspec_2_rails_3/spec_helper.rb +0 -3
  99. data/spec/suites/rspec_2_rails_4/integration/minitest_4_rails_4_spec.rb +0 -66
  100. data/spec/suites/rspec_2_rails_4/integration/rspec_2_rails_4_spec.rb +0 -156
  101. data/spec/suites/rspec_2_rails_4/integration/test_unit_200_rails_4_spec.rb +0 -66
  102. data/spec/suites/rspec_2_rails_4/integration/test_unit_2_rails_4_spec.rb +0 -66
  103. data/spec/suites/rspec_2_rails_4/spec_helper.rb +0 -3
  104. data/spec/suites/test_unit_1/integration/test_unit_1_test.rb +0 -10
  105. data/spec/suites/test_unit_1/test_helper.rb +0 -10
  106. data/spec/suites/test_unit_2/integration/test_unit_2_test.rb +0 -10
  107. data/spec/suites/test_unit_2/test_helper.rb +0 -6
  108. data/spec/suites/test_unit_200/integration/test_unit_200_test.rb +0 -10
  109. data/spec/suites/test_unit_200/test_helper.rb +0 -6
  110. data/spec/suites/test_unit_200_rails_3/integration/test_unit_200_rails_3_test.rb +0 -10
  111. data/spec/suites/test_unit_200_rails_3/test_helper.rb +0 -7
  112. data/spec/suites/test_unit_200_rails_4/integration/test_unit_200_rails_4_test.rb +0 -10
  113. data/spec/suites/test_unit_200_rails_4/test_helper.rb +0 -7
  114. data/spec/suites/test_unit_2_rails_2/integration/test_unit_2_rails_2_test.rb +0 -10
  115. data/spec/suites/test_unit_2_rails_2/test_helper.rb +0 -7
  116. data/spec/suites/test_unit_2_rails_3/integration/test_unit_2_rails_3_test.rb +0 -10
  117. data/spec/suites/test_unit_2_rails_3/test_helper.rb +0 -7
  118. data/spec/suites/test_unit_2_rails_4/integration/test_unit_2_rails_4_test.rb +0 -10
  119. data/spec/suites/test_unit_2_rails_4/test_helper.rb +0 -7
@@ -1,66 +0,0 @@
1
- require File.expand_path('../../spec_helper', __FILE__)
2
- require File.expand_path('../../../common/adapter_integration_tests', __FILE__)
3
- require File.expand_path('../../../common/rails_integration_tests', __FILE__)
4
-
5
- describe 'Integration with Test::Unit >= 2.5 and Rails 4' do
6
- def adapter_name
7
- 'test_unit_2_rails_3'
8
- end
9
-
10
- def test_framework_path
11
- 'test/unit'
12
- end
13
-
14
- def before_require_test_framework
15
- <<-EOT
16
- require 'rails'
17
- require 'active_support'
18
- EOT
19
- end
20
-
21
- def error_test
22
- with_bootstrap <<-EOT
23
- class FooTest < ActiveSupport::TestCase
24
- def test_foo
25
- object = Object.new
26
- mock(object).foo
27
- end
28
- end
29
- EOT
30
- end
31
-
32
- def include_adapter_test
33
- with_bootstrap <<-EOT
34
- class ActiveSupport::TestCase
35
- include RR::Adapters::TestUnit
36
- end
37
-
38
- class FooTest < ActiveSupport::TestCase
39
- def test_foo
40
- object = Object.new
41
- mock(object).foo
42
- object.foo
43
- end
44
- end
45
- EOT
46
- end
47
-
48
- def include_adapter_where_rr_included_before_test_framework_test
49
- with_bootstrap <<-EOT, :include_rr_before => true
50
- class ActiveSupport::TestCase
51
- include RR::Adapters::TestUnit
52
- end
53
-
54
- class FooTest < ActiveSupport::TestCase
55
- def test_foo
56
- object = Object.new
57
- mock(object).foo
58
- object.foo
59
- end
60
- end
61
- EOT
62
- end
63
-
64
- include AdapterIntegrationTests
65
- include RailsIntegrationTests
66
- end
@@ -1,3 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:rspec_2_rails_4)
3
- require File.expand_path('../../rspec_2/helper', __FILE__)
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../../common/test_unit_tests', __FILE__)
3
-
4
- class TestUnitIntegrationTest < Test::Unit::TestCase
5
- def applicable_adapter_names
6
- [:TestUnit1]
7
- end
8
-
9
- include TestUnitTests
10
- end
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:test_unit_1)
3
-
4
- require 'test/unit'
5
- begin; require 'test/unit/version'; rescue LoadError; end
6
- if defined?(::Test::Unit::VERSION)
7
- raise "You seem to have Test::Unit 2.x loaded!"
8
- end
9
-
10
- require 'rr'
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../../common/test_unit_tests', __FILE__)
3
-
4
- class TestUnitIntegrationTest < Test::Unit::TestCase
5
- def applicable_adapter_names
6
- [:TestUnit2]
7
- end
8
-
9
- include TestUnitTests
10
- end
@@ -1,6 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:test_unit_2)
3
-
4
- require 'test/unit'
5
-
6
- require 'rr'
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../../common/test_unit_tests', __FILE__)
3
-
4
- class TestUnitIntegrationTest < Test::Unit::TestCase
5
- def applicable_adapter_names
6
- [:TestUnit200, :MiniTest4]
7
- end
8
-
9
- include TestUnitTests
10
- end
@@ -1,6 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:test_unit_200)
3
-
4
- require 'test/unit'
5
-
6
- require 'rr'
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../../common/test_unit_tests', __FILE__)
3
-
4
- class TestUnit200Rails3IntegrationTest < ActiveSupport::TestCase
5
- def applicable_adapter_names
6
- [:TestUnit200, :TestUnit200ActiveSupport, :MiniTest4, :MiniTest4ActiveSupport]
7
- end
8
-
9
- include TestUnitTests
10
- end
@@ -1,7 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:test_unit_200_rails_3)
3
-
4
- require 'test/unit'
5
- require 'active_support/test_case'
6
-
7
- require 'rr'
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../../common/test_unit_tests', __FILE__)
3
-
4
- class TestUnit200Rails4IntegrationTest < ActiveSupport::TestCase
5
- def applicable_adapter_names
6
- [:TestUnit200, :TestUnit200ActiveSupport, :MiniTest4, :MiniTest4ActiveSupport]
7
- end
8
-
9
- include TestUnitTests
10
- end
@@ -1,7 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:test_unit_200_rails_4)
3
-
4
- require 'test/unit'
5
- require 'active_support/test_case'
6
-
7
- require 'rr'
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../../common/test_unit_tests', __FILE__)
3
-
4
- class TestUnit2Rails3IntegrationTest < ActiveSupport::TestCase
5
- def applicable_adapter_names
6
- [:TestUnit2, :TestUnit2ActiveSupport]
7
- end
8
-
9
- include TestUnitTests
10
- end
@@ -1,7 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:test_unit_2_rails_2)
3
-
4
- require 'test/unit'
5
- require 'active_support/test_case'
6
-
7
- require 'rr'
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../../common/test_unit_tests', __FILE__)
3
-
4
- class TestUnit2Rails3IntegrationTest < ActiveSupport::TestCase
5
- def applicable_adapter_names
6
- [:TestUnit2, :TestUnit2ActiveSupport]
7
- end
8
-
9
- include TestUnitTests
10
- end
@@ -1,7 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:test_unit_2_rails_3)
3
-
4
- require 'test/unit'
5
- require 'active_support/test_case'
6
-
7
- require 'rr'
@@ -1,10 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../../common/test_unit_tests', __FILE__)
3
-
4
- class TestUnit2Rails4IntegrationTest < ActiveSupport::TestCase
5
- def applicable_adapter_names
6
- [:TestUnit2, :TestUnit2ActiveSupport]
7
- end
8
-
9
- include TestUnitTests
10
- end
@@ -1,7 +0,0 @@
1
- require File.expand_path('../../../global_helper', __FILE__)
2
- RR::Test.setup_test_suite(:test_unit_2_rails_4)
3
-
4
- require 'test/unit'
5
- require 'active_support/test_case'
6
-
7
- require 'rr'