infinity_test 1.0.3 → 2.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ci.yml +31 -0
  3. data/.gitignore +3 -0
  4. data/.rspec +2 -2
  5. data/AI_INTEGRATION_IDEAS.md +203 -0
  6. data/Gemfile +3 -15
  7. data/HISTORY.md +84 -0
  8. data/History.markdown +82 -0
  9. data/{.infinity_test → INFINITY_TEST} +18 -15
  10. data/LICENSE.txt +2 -2
  11. data/README.md +867 -0
  12. data/Rakefile +1 -65
  13. data/TODO.markdown +38 -24
  14. data/bin/infinity_test +1 -4
  15. data/images/fuuu/pending.png +0 -0
  16. data/images/fuuu/success.png +0 -0
  17. data/infinity_test.gemspec +41 -189
  18. data/lib/infinity_test/core/auto_discover.rb +67 -0
  19. data/lib/infinity_test/core/base.rb +369 -0
  20. data/lib/infinity_test/core/callback.rb +59 -0
  21. data/lib/infinity_test/core/changed_file.rb +13 -0
  22. data/lib/infinity_test/core/command_builder.rb +48 -0
  23. data/lib/infinity_test/core/command_runner.rb +38 -0
  24. data/lib/infinity_test/core/configuration_merge.rb +37 -0
  25. data/lib/infinity_test/core/continuous_test_server.rb +124 -0
  26. data/lib/infinity_test/core/load_configuration.rb +48 -0
  27. data/lib/infinity_test/core/notifier.rb +59 -0
  28. data/lib/infinity_test/core/options.rb +134 -0
  29. data/lib/infinity_test/core/runner.rb +18 -0
  30. data/lib/infinity_test/core/version.rb +5 -0
  31. data/lib/infinity_test/framework/base.rb +93 -0
  32. data/lib/infinity_test/framework/django.rb +109 -0
  33. data/lib/infinity_test/framework/elixir_mix.rb +47 -0
  34. data/lib/infinity_test/framework/fast_api.rb +104 -0
  35. data/lib/infinity_test/framework/padrino.rb +30 -0
  36. data/lib/infinity_test/framework/phoenix.rb +72 -0
  37. data/lib/infinity_test/framework/python_package.rb +97 -0
  38. data/lib/infinity_test/framework/rails.rb +26 -0
  39. data/lib/infinity_test/framework/rocket.rb +70 -0
  40. data/lib/infinity_test/framework/rubygems.rb +29 -0
  41. data/lib/infinity_test/framework/rust_cargo.rb +69 -0
  42. data/lib/infinity_test/framework/shared_example.rb +47 -0
  43. data/lib/infinity_test/observer/base.rb +40 -0
  44. data/lib/infinity_test/observer/filewatcher.rb +72 -0
  45. data/lib/infinity_test/observer/listen.rb +74 -0
  46. data/lib/infinity_test/observer/shared_example.rb +35 -0
  47. data/lib/infinity_test/old_dsl/configuration.rb +26 -0
  48. data/lib/infinity_test/strategy/base.rb +50 -0
  49. data/lib/infinity_test/strategy/elixir_default.rb +20 -0
  50. data/lib/infinity_test/strategy/python_default.rb +22 -0
  51. data/lib/infinity_test/strategy/rbenv.rb +34 -0
  52. data/lib/infinity_test/strategy/ruby_default.rb +21 -0
  53. data/lib/infinity_test/strategy/rust_default.rb +21 -0
  54. data/lib/infinity_test/strategy/rvm.rb +52 -0
  55. data/lib/infinity_test/strategy/shared_example.rb +32 -0
  56. data/lib/infinity_test/test_framework/base.rb +64 -0
  57. data/lib/infinity_test/test_framework/cargo_test.rb +49 -0
  58. data/lib/infinity_test/test_framework/ex_unit.rb +53 -0
  59. data/lib/infinity_test/test_framework/pytest.rb +65 -0
  60. data/lib/infinity_test/test_framework/rspec.rb +48 -0
  61. data/lib/infinity_test/test_framework/shared_example.rb +56 -0
  62. data/lib/infinity_test/test_framework/test_unit.rb +57 -0
  63. data/lib/infinity_test.rb +66 -35
  64. data/spec/infinity_test/core/auto_discover_spec.rb +175 -0
  65. data/spec/infinity_test/core/base_spec.rb +240 -0
  66. data/spec/infinity_test/core/callback_spec.rb +89 -0
  67. data/spec/infinity_test/core/changed_file_spec.rb +26 -0
  68. data/spec/infinity_test/core/command_builder_spec.rb +38 -0
  69. data/spec/infinity_test/core/configuration_merge_spec.rb +124 -0
  70. data/spec/infinity_test/core/continuous_test_server_spec.rb +116 -0
  71. data/spec/infinity_test/core/load_configuration_spec.rb +43 -0
  72. data/spec/infinity_test/core/notifier_spec.rb +151 -0
  73. data/spec/infinity_test/core/options_spec.rb +168 -0
  74. data/spec/infinity_test/core/runner_spec.rb +17 -0
  75. data/spec/infinity_test/framework/base_spec.rb +55 -0
  76. data/spec/infinity_test/framework/django_spec.rb +95 -0
  77. data/spec/infinity_test/framework/elixir_mix_spec.rb +44 -0
  78. data/spec/infinity_test/framework/fast_api_spec.rb +96 -0
  79. data/spec/infinity_test/framework/padrino_spec.rb +58 -0
  80. data/spec/infinity_test/framework/phoenix_spec.rb +85 -0
  81. data/spec/infinity_test/framework/python_package_spec.rb +95 -0
  82. data/spec/infinity_test/framework/rails_spec.rb +58 -0
  83. data/spec/infinity_test/framework/rocket_spec.rb +69 -0
  84. data/spec/infinity_test/framework/rubygems_spec.rb +34 -0
  85. data/spec/infinity_test/framework/rust_cargo_spec.rb +94 -0
  86. data/spec/infinity_test/observer/base_spec.rb +78 -0
  87. data/spec/infinity_test/observer/filewatcher_spec.rb +51 -0
  88. data/spec/infinity_test/observer/listen_spec.rb +50 -0
  89. data/spec/infinity_test/{builder_spec.rb → strategy/base_spec.rb} +1 -2
  90. data/spec/infinity_test/strategy/elixir_default_spec.rb +46 -0
  91. data/spec/infinity_test/strategy/python_default_spec.rb +56 -0
  92. data/spec/infinity_test/strategy/rbenv_spec.rb +70 -0
  93. data/spec/infinity_test/strategy/ruby_default_spec.rb +49 -0
  94. data/spec/infinity_test/strategy/rust_default_spec.rb +56 -0
  95. data/spec/infinity_test/strategy/rvm_spec.rb +86 -0
  96. data/spec/infinity_test/test_framework/cargo_test_spec.rb +145 -0
  97. data/spec/infinity_test/test_framework/ex_unit_spec.rb +153 -0
  98. data/spec/infinity_test/test_framework/pytest_spec.rb +182 -0
  99. data/spec/infinity_test/test_framework/rspec_spec.rb +119 -0
  100. data/spec/infinity_test/test_framework/test_unit_spec.rb +193 -0
  101. data/spec/spec_helper.rb +34 -119
  102. metadata +315 -177
  103. data/.rvmrc +0 -1
  104. data/Gemfile.lock +0 -62
  105. data/Readme.markdown +0 -147
  106. data/Tasks +0 -4
  107. data/VERSION.yml +0 -5
  108. data/buzz_images/buzz_lightyear.jpg +0 -0
  109. data/buzz_images/buzz_lightyear_continencia.gif +0 -0
  110. data/buzz_images/to_infinity_and_beyond.png +0 -0
  111. data/features/heuristics.feature +0 -23
  112. data/features/support/env.rb +0 -2
  113. data/images/fuuu/sucess.png +0 -0
  114. data/lib/infinity_test/application.rb +0 -362
  115. data/lib/infinity_test/application_library/rails.rb +0 -94
  116. data/lib/infinity_test/application_library/rubygems.rb +0 -43
  117. data/lib/infinity_test/binary_path.rb +0 -43
  118. data/lib/infinity_test/builder.rb +0 -66
  119. data/lib/infinity_test/command.rb +0 -58
  120. data/lib/infinity_test/configuration.rb +0 -277
  121. data/lib/infinity_test/continuous_testing.rb +0 -40
  122. data/lib/infinity_test/dependencies.rb +0 -80
  123. data/lib/infinity_test/environment.rb +0 -15
  124. data/lib/infinity_test/heuristics.rb +0 -36
  125. data/lib/infinity_test/heuristics_helper.rb +0 -9
  126. data/lib/infinity_test/options.rb +0 -96
  127. data/lib/infinity_test/runner.rb +0 -38
  128. data/lib/infinity_test/test_framework.rb +0 -110
  129. data/lib/infinity_test/test_library/bacon.rb +0 -55
  130. data/lib/infinity_test/test_library/cucumber.rb +0 -22
  131. data/lib/infinity_test/test_library/rspec.rb +0 -60
  132. data/lib/infinity_test/test_library/test_unit.rb +0 -52
  133. data/lib/infinity_test/test_unit_loader.rb +0 -5
  134. data/spec/factories/buzz/lib/buzz.rb +0 -0
  135. data/spec/factories/buzz/spec/buzz_spec.rb +0 -0
  136. data/spec/factories/company/Gemfile +0 -0
  137. data/spec/factories/company/lib/company.rb +0 -0
  138. data/spec/factories/company/test/company_test.rb +0 -0
  139. data/spec/factories/images/failure.png +0 -0
  140. data/spec/factories/images/pending.png +0 -0
  141. data/spec/factories/images/sucess.png +0 -0
  142. data/spec/factories/infinity_test +0 -5
  143. data/spec/factories/infinity_test_example +0 -7
  144. data/spec/factories/slinky/spec/slinky/slinky_spec.rb +0 -0
  145. data/spec/factories/travel/lib/travel.rb +0 -0
  146. data/spec/factories/travel/test/partner_test.rb +0 -0
  147. data/spec/factories/travel/test/travel_test.rb +0 -0
  148. data/spec/factories/wood/lib/wood.rb +0 -0
  149. data/spec/factories/wood/spec/wood_spec.rb +0 -0
  150. data/spec/infinity_test/application_library/rails_spec.rb +0 -140
  151. data/spec/infinity_test/application_library/rubygems_spec.rb +0 -52
  152. data/spec/infinity_test/application_spec.rb +0 -434
  153. data/spec/infinity_test/binary_path_spec.rb +0 -72
  154. data/spec/infinity_test/command_spec.rb +0 -53
  155. data/spec/infinity_test/configuration_spec.rb +0 -382
  156. data/spec/infinity_test/continuous_testing_spec.rb +0 -25
  157. data/spec/infinity_test/environment_spec.rb +0 -23
  158. data/spec/infinity_test/heuristics_helper_spec.rb +0 -15
  159. data/spec/infinity_test/heuristics_spec.rb +0 -127
  160. data/spec/infinity_test/options_spec.rb +0 -111
  161. data/spec/infinity_test/runner_spec.rb +0 -42
  162. data/spec/infinity_test/test_framework_spec.rb +0 -127
  163. data/spec/infinity_test/test_library/bacon_spec.rb +0 -150
  164. data/spec/infinity_test/test_library/cucumber_spec.rb +0 -8
  165. data/spec/infinity_test/test_library/rspec_spec.rb +0 -189
  166. data/spec/infinity_test/test_library/test_unit_spec.rb +0 -184
  167. data/spec/infinity_test_spec.rb +0 -40
  168. /data/images/faces/{sucess.png → success.png} +0 -0
  169. /data/images/hands/{sucess.png → success.png} +0 -0
  170. /data/images/mario_bros/{sucess.jpg → success.jpg} +0 -0
  171. /data/images/rails/{sucess.png → success.png} +0 -0
  172. /data/images/rubies/{sucess.png → success.png} +0 -0
  173. /data/images/simpson/{sucess.jpg → success.jpg} +0 -0
  174. /data/images/street_fighter/{sucess.jpg → success.jpg} +0 -0
  175. /data/images/toy_story/{sucess.png → success.png} +0 -0
@@ -1,184 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module InfinityTest
4
- module TestLibrary
5
- describe TestUnit do
6
-
7
- before(:each) do
8
- @current_dir = Dir.pwd
9
- end
10
-
11
- it "should be possible to set all rubies" do
12
- TestUnit.new(:rubies => 'jruby').rubies.should be == 'jruby'
13
- end
14
-
15
- it "should be possible to set any rubies that I want" do
16
- TestUnit.new(:rubies => 'ree,1.9.1,1.9.2').rubies.should be == 'ree,1.9.1,1.9.2'
17
- end
18
-
19
- it "should be empty when not have rubies" do
20
- TestUnit.new.rubies.should be == []
21
- end
22
-
23
- describe "#test_loader" do
24
- let(:test_unit) { TestUnit.new }
25
- it "should call files to test with test_loader" do
26
- Dir.chdir("#{@current_dir}/spec/factories/travel") do
27
- test_unit.test_loader.should eql "#{@current_dir}/lib/infinity_test/test_unit_loader.rb"
28
- end
29
- end
30
-
31
- context "should call more than one file to test with test_loader" do
32
-
33
- it "return should include test/company_test.rb" do
34
- Dir.chdir("#{@current_dir}/spec/factories/company") do
35
- test_unit.all_files.should include "test/company_test.rb"
36
- end
37
- end
38
-
39
- it "return should include more than one file to test" do
40
- Dir.chdir("#{@current_dir}/spec/factories/travel") do
41
- files = test_unit.all_files.should eql ["test/partner_test.rb", "test/travel_test.rb"]
42
- end
43
- end
44
-
45
- it "should include all the tests file" do
46
- Dir.chdir("#{@current_dir}/spec/factories/travel") do
47
- test_unit.test_files.should include "test/partner_test.rb test/travel_test.rb"
48
- end
49
- end
50
-
51
- it "should include test loader" do
52
- Dir.chdir("#{@current_dir}/spec/factories/travel") do
53
- test_unit.test_files.should include "#{@current_dir}/lib/infinity_test/test_unit_loader.rb"
54
- end
55
- end
56
-
57
- end
58
- end
59
-
60
- describe '#parse_results' do
61
-
62
- before do
63
- @test_unit = TestUnit.new
64
- end
65
-
66
- it "should parse when have all passed" do
67
- results = ".....\n3 tests, 3 assertions, 0 failures, 0 errors, 0 skips"
68
- @test_unit.parse_results(results)
69
- @test_unit.message.should == "3 tests, 3 assertions, 0 failures, 0 errors, 0 skips"
70
- end
71
-
72
- it "should parse when have extra message (in Ruby 1.9.*)" do
73
- results = "\nFinished in 0.001742 seconds.\n\n3 tests, 3 assertions, 1 failures, 1 errors, 1 skips\n\nTest run options: --seed 18841\n"
74
- @test_unit.parse_results(results)
75
- @test_unit.message.should == "3 tests, 3 assertions, 1 failures, 1 errors, 1 skips"
76
- end
77
-
78
- it "should parse when have a exception" do
79
- @test_unit.parse_results("")
80
- @test_unit.message.should == "An exception occurred"
81
- end
82
-
83
- it "should parse and set correctly the tests" do
84
- results = "\nFinished in 0.8981 seconds.\n\n3 tests, 3 assertions, 1 failures, 1 errors, 1 skips\n\nTest run options: --seed 18841\n"
85
- @test_unit.parse_results(results)
86
- @test_unit.tests.should == 3
87
- end
88
-
89
- it "should parse and set correctly the tests" do
90
- results = "\nFinished in 0.5678 seconds.\n\n6 tests, 3 assertions, 1 failures, 1 errors, 1 skips\n\nTest run options: --seed 18841\n"
91
- @test_unit.parse_results(results)
92
- @test_unit.tests.should == 6
93
- end
94
-
95
- it "should parse and set correctly the tests" do
96
- results = "\nFinished in 0.34678 seconds.\n\n6 tests, 7 assertions, 1 failures, 1 errors, 1 skips\n\nTest run options: --seed 18841\n"
97
- @test_unit.parse_results(results)
98
- @test_unit.assertions.should == 7
99
- end
100
-
101
- it "should parse and set correctly the tests" do
102
- results = "\nFinished in 0.8561 seconds.\n\n3 tests, 4 assertions, 1 failures, 1 errors, 1 skips\n\nTest run options: --seed 18841\n"
103
- @test_unit.parse_results(results)
104
- @test_unit.assertions.should == 4
105
- end
106
-
107
- it "should parse and set correctly the tests" do
108
- results = "\nFinished in 0.7654 seconds.\n\n6 tests, 3 assertions, 4 failures, 1 errors, 1 skips\n\nTest run options: --seed 18841\n"
109
- @test_unit.parse_results(results)
110
- @test_unit.failures.should == 4
111
- end
112
-
113
- it "should parse and set correctly the tests" do
114
- results = "\nFinished in 0.789065 seconds.\n\n6 tests, 3 assertions, 5 failures, 1 errors, 1 skips\n\nTest run options: --seed 18841\n"
115
- @test_unit.parse_results(results)
116
- @test_unit.failures.should == 5
117
- end
118
-
119
- it "should parse and set correctly the tests" do
120
- results = "\nFinished in 0.7654 seconds.\n\n6 tests, 3 assertions, 4 failures, 2 errors, 1 skips\n\nTest run options: --seed 18841\n"
121
- @test_unit.parse_results(results)
122
- @test_unit.errors.should == 2
123
- end
124
-
125
- it "should parse and set correctly the tests" do
126
- results = "\nFinished in 0.7654 seconds.\n\n36 tests, 37 assertions, 4 failures, 20 errors, 1 skips\n\nTest run options: --seed 18841\n"
127
- @test_unit.parse_results(results)
128
- @test_unit.errors.should == 20
129
- end
130
-
131
- it "should parse when have a exception and set failure to 1" do
132
- @test_unit.parse_results("")
133
- @test_unit.failures.should == 1
134
- @test_unit.tests.should == 1
135
- @test_unit.assertions.should == 1
136
- @test_unit.errors.should == 1
137
- end
138
-
139
- end
140
-
141
- describe '#failure?' do
142
-
143
- before do
144
- @test_unit = TestUnit.new
145
- end
146
-
147
- it "should return true when have failures" do
148
- @test_unit.parse_results(".....\n3 tests, 3 assertions, 1 failures, 0 errors, 0 skips")
149
- @test_unit.failure?.should be_true
150
- end
151
-
152
- it "should return true when have errors" do
153
- @test_unit.parse_results(".....\n3 tests, 3 assertions, 0 failures, 4 errors, 0 skips")
154
- @test_unit.failure?.should be_true
155
- end
156
-
157
- it "should return true when have nothing" do
158
- @test_unit.parse_results("")
159
- @test_unit.failure?.should be_true
160
- end
161
-
162
- it "should return false when have all suceed :) " do
163
- @test_unit.parse_results(".....\n3 tests, 3 assertions, 0 failures, 0 errors, 0 skips")
164
- @test_unit.failure?.should be_false
165
- end
166
-
167
- it 'should return false when have all assertions and tests suceed \o/ ' do
168
- @test_unit.parse_results(".....\n4 tests, 7 assertions, 0 failures, 0 errors, 0 skips")
169
- @test_unit.failure?.should be_false
170
- end
171
-
172
- end
173
-
174
- describe '#pending?' do
175
-
176
- it "should be false" do
177
- TestUnit.new.pending?.should equal false
178
- end
179
-
180
- end
181
-
182
- end
183
- end
184
- end
@@ -1,40 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe InfinityTest do
4
-
5
- describe '.application' do
6
-
7
- it "should be a instace of Application" do
8
- InfinityTest.application.should be_instance_of(InfinityTest::Application)
9
- end
10
-
11
- it "should cache instance variable in the same object" do
12
- application = InfinityTest.application
13
- InfinityTest.application.should equal application
14
- end
15
-
16
- end
17
-
18
- describe '.configuration' do
19
-
20
- it { InfinityTest.configuration.should be_instance_of(InfinityTest::Configuration) }
21
-
22
- it "should cache the instance of configuration class" do
23
- configuration = InfinityTest.configuration
24
- configuration.should equal InfinityTest.configuration
25
- end
26
-
27
- end
28
-
29
- describe '.watchr' do
30
-
31
- it { InfinityTest.watchr.should be_instance_of(Watchr::Script) }
32
-
33
- it "should cache the instance of Watchr script class" do
34
- watchr = InfinityTest.watchr
35
- watchr.should equal InfinityTest.watchr
36
- end
37
-
38
- end
39
-
40
- end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes