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.
- checksums.yaml +4 -4
- data/CREDITS.md +61 -0
- data/VERSION +1 -1
- data/doc/01_test_double.md +16 -0
- data/doc/02_syntax_comparison.md +96 -0
- data/doc/03_api_overview.md +616 -0
- data/rr.gemspec +6 -6
- metadata +12 -230
- data/spec/global_helper.rb +0 -53
- data/spec/spec.opts +0 -2
- data/spec/suite.rb +0 -107
- data/spec/suites/common/adapter_integration_tests.rb +0 -160
- data/spec/suites/common/adapter_tests.rb +0 -43
- data/spec/suites/common/rails_integration_tests.rb +0 -106
- data/spec/suites/common/test_unit_tests.rb +0 -21
- data/spec/suites/minitest/integration/minitest_test.rb +0 -13
- data/spec/suites/minitest/test_helper.rb +0 -7
- data/spec/suites/minitest_4/integration/minitest_test.rb +0 -13
- data/spec/suites/minitest_4/test_helper.rb +0 -7
- data/spec/suites/rspec_1/helper.rb +0 -24
- data/spec/suites/rspec_1/integration/rspec_1_spec.rb +0 -77
- data/spec/suites/rspec_1/integration/test_unit_1_spec.rb +0 -41
- data/spec/suites/rspec_1/integration/test_unit_2_spec.rb +0 -57
- data/spec/suites/rspec_1/spec_helper.rb +0 -3
- data/spec/suites/rspec_1_rails_2/integration/test_unit_1_rails_2_spec.rb +0 -53
- data/spec/suites/rspec_1_rails_2/integration/test_unit_2_rails_2_spec.rb +0 -57
- data/spec/suites/rspec_1_rails_2/spec_helper.rb +0 -3
- data/spec/suites/rspec_2/functional/any_instance_of_spec.rb +0 -47
- data/spec/suites/rspec_2/functional/dont_allow_spec.rb +0 -12
- data/spec/suites/rspec_2/functional/dsl_spec.rb +0 -13
- data/spec/suites/rspec_2/functional/instance_of_spec.rb +0 -14
- data/spec/suites/rspec_2/functional/mock_spec.rb +0 -241
- data/spec/suites/rspec_2/functional/proxy_spec.rb +0 -136
- data/spec/suites/rspec_2/functional/spy_spec.rb +0 -41
- data/spec/suites/rspec_2/functional/strong_spec.rb +0 -79
- data/spec/suites/rspec_2/functional/stub_spec.rb +0 -190
- data/spec/suites/rspec_2/functional/wildcard_matchers_spec.rb +0 -128
- data/spec/suites/rspec_2/helper.rb +0 -27
- data/spec/suites/rspec_2/integration/minitest_4_spec.rb +0 -57
- data/spec/suites/rspec_2/integration/minitest_spec.rb +0 -57
- data/spec/suites/rspec_2/integration/rspec_2_spec.rb +0 -126
- data/spec/suites/rspec_2/integration/test_unit_200_spec.rb +0 -57
- data/spec/suites/rspec_2/integration/test_unit_2_spec.rb +0 -57
- data/spec/suites/rspec_2/spec_helper.rb +0 -3
- data/spec/suites/rspec_2/support/matchers/wildcard_matcher_matchers.rb +0 -32
- data/spec/suites/rspec_2/support/shared_examples/space.rb +0 -13
- data/spec/suites/rspec_2/support/shared_examples/times_called_expectation.rb +0 -9
- data/spec/suites/rspec_2/unit/adapters/rr_methods/double_creators_spec.rb +0 -135
- data/spec/suites/rspec_2/unit/adapters/rr_methods/space_spec.rb +0 -101
- data/spec/suites/rspec_2/unit/adapters/rr_methods/wildcard_matchers_spec.rb +0 -69
- data/spec/suites/rspec_2/unit/core_ext/array_spec.rb +0 -39
- data/spec/suites/rspec_2/unit/core_ext/enumerable_spec.rb +0 -81
- data/spec/suites/rspec_2/unit/core_ext/hash_spec.rb +0 -55
- data/spec/suites/rspec_2/unit/core_ext/range_spec.rb +0 -41
- data/spec/suites/rspec_2/unit/core_ext/regexp_spec.rb +0 -41
- data/spec/suites/rspec_2/unit/double_definitions/child_double_definition_create_spec.rb +0 -114
- data/spec/suites/rspec_2/unit/double_definitions/double_definition_create_blank_slate_spec.rb +0 -93
- data/spec/suites/rspec_2/unit/double_definitions/double_definition_create_spec.rb +0 -446
- data/spec/suites/rspec_2/unit/errors/rr_error_spec.rb +0 -67
- data/spec/suites/rspec_2/unit/expectations/any_argument_expectation_spec.rb +0 -48
- data/spec/suites/rspec_2/unit/expectations/anything_argument_equality_expectation_spec.rb +0 -14
- data/spec/suites/rspec_2/unit/expectations/argument_equality_expectation_spec.rb +0 -135
- data/spec/suites/rspec_2/unit/expectations/boolean_argument_equality_expectation_spec.rb +0 -30
- data/spec/suites/rspec_2/unit/expectations/hash_including_argument_equality_expectation_spec.rb +0 -82
- data/spec/suites/rspec_2/unit/expectations/satisfy_argument_equality_expectation_spec.rb +0 -61
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/any_times_matcher_spec.rb +0 -22
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/at_least_matcher_spec.rb +0 -37
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/at_most_matcher_spec.rb +0 -43
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/integer_matcher_spec.rb +0 -58
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/proc_matcher_spec.rb +0 -35
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/range_matcher_spec.rb +0 -39
- data/spec/suites/rspec_2/unit/hash_with_object_id_key_spec.rb +0 -88
- data/spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb +0 -545
- data/spec/suites/rspec_2/unit/injections/double_injection/double_injection_verify_spec.rb +0 -32
- data/spec/suites/rspec_2/unit/integrations/rspec/invocation_matcher_spec.rb +0 -297
- data/spec/suites/rspec_2/unit/integrations/rspec_spec.rb +0 -85
- data/spec/suites/rspec_2/unit/proc_from_block_spec.rb +0 -14
- data/spec/suites/rspec_2/unit/rr_spec.rb +0 -28
- data/spec/suites/rspec_2/unit/space_spec.rb +0 -595
- data/spec/suites/rspec_2/unit/spy_verification_spec.rb +0 -133
- data/spec/suites/rspec_2/unit/times_called_matchers/any_times_matcher_spec.rb +0 -46
- data/spec/suites/rspec_2/unit/times_called_matchers/at_least_matcher_spec.rb +0 -54
- data/spec/suites/rspec_2/unit/times_called_matchers/at_most_matcher_spec.rb +0 -69
- data/spec/suites/rspec_2/unit/times_called_matchers/integer_matcher_spec.rb +0 -69
- data/spec/suites/rspec_2/unit/times_called_matchers/proc_matcher_spec.rb +0 -54
- data/spec/suites/rspec_2/unit/times_called_matchers/range_matcher_spec.rb +0 -75
- data/spec/suites/rspec_2/unit/times_called_matchers/times_called_matcher_spec.rb +0 -117
- data/spec/suites/rspec_2/unit/wildcard_matchers/anything_spec.rb +0 -33
- data/spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb +0 -45
- data/spec/suites/rspec_2/unit/wildcard_matchers/duck_type_spec.rb +0 -64
- data/spec/suites/rspec_2/unit/wildcard_matchers/hash_including_spec.rb +0 -64
- data/spec/suites/rspec_2/unit/wildcard_matchers/is_a_spec.rb +0 -55
- data/spec/suites/rspec_2/unit/wildcard_matchers/numeric_spec.rb +0 -46
- data/spec/suites/rspec_2/unit/wildcard_matchers/satisfy_spec.rb +0 -57
- data/spec/suites/rspec_2_rails_3/integration/minitest_4_rails_3_spec.rb +0 -66
- data/spec/suites/rspec_2_rails_3/integration/test_unit_200_rails_3_spec.rb +0 -66
- data/spec/suites/rspec_2_rails_3/integration/test_unit_2_rails_3_spec.rb +0 -66
- data/spec/suites/rspec_2_rails_3/spec_helper.rb +0 -3
- data/spec/suites/rspec_2_rails_4/integration/minitest_4_rails_4_spec.rb +0 -66
- data/spec/suites/rspec_2_rails_4/integration/rspec_2_rails_4_spec.rb +0 -156
- data/spec/suites/rspec_2_rails_4/integration/test_unit_200_rails_4_spec.rb +0 -66
- data/spec/suites/rspec_2_rails_4/integration/test_unit_2_rails_4_spec.rb +0 -66
- data/spec/suites/rspec_2_rails_4/spec_helper.rb +0 -3
- data/spec/suites/test_unit_1/integration/test_unit_1_test.rb +0 -10
- data/spec/suites/test_unit_1/test_helper.rb +0 -10
- data/spec/suites/test_unit_2/integration/test_unit_2_test.rb +0 -10
- data/spec/suites/test_unit_2/test_helper.rb +0 -6
- data/spec/suites/test_unit_200/integration/test_unit_200_test.rb +0 -10
- data/spec/suites/test_unit_200/test_helper.rb +0 -6
- data/spec/suites/test_unit_200_rails_3/integration/test_unit_200_rails_3_test.rb +0 -10
- data/spec/suites/test_unit_200_rails_3/test_helper.rb +0 -7
- data/spec/suites/test_unit_200_rails_4/integration/test_unit_200_rails_4_test.rb +0 -10
- data/spec/suites/test_unit_200_rails_4/test_helper.rb +0 -7
- data/spec/suites/test_unit_2_rails_2/integration/test_unit_2_rails_2_test.rb +0 -10
- data/spec/suites/test_unit_2_rails_2/test_helper.rb +0 -7
- data/spec/suites/test_unit_2_rails_3/integration/test_unit_2_rails_3_test.rb +0 -10
- data/spec/suites/test_unit_2_rails_3/test_helper.rb +0 -7
- data/spec/suites/test_unit_2_rails_4/integration/test_unit_2_rails_4_test.rb +0 -10
- 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,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,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,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,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,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,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,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
|