infinity_test 1.0.3 → 2.0.0.rc1

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 (148) 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.markdown +82 -0
  8. data/{.infinity_test → INFINITY_TEST} +18 -15
  9. data/LICENSE.txt +2 -2
  10. data/README.md +627 -0
  11. data/Rakefile +1 -65
  12. data/TODO.markdown +24 -19
  13. data/bin/infinity_test +1 -4
  14. data/images/fuuu/pending.png +0 -0
  15. data/images/fuuu/success.png +0 -0
  16. data/infinity_test.gemspec +41 -189
  17. data/lib/infinity_test/core/auto_discover.rb +67 -0
  18. data/lib/infinity_test/core/base.rb +369 -0
  19. data/lib/infinity_test/core/callback.rb +59 -0
  20. data/lib/infinity_test/core/changed_file.rb +13 -0
  21. data/lib/infinity_test/core/command_builder.rb +48 -0
  22. data/lib/infinity_test/core/command_runner.rb +62 -0
  23. data/lib/infinity_test/core/configuration_merge.rb +37 -0
  24. data/lib/infinity_test/core/continuous_test_server.rb +106 -0
  25. data/lib/infinity_test/core/load_configuration.rb +48 -0
  26. data/lib/infinity_test/core/notifier.rb +59 -0
  27. data/lib/infinity_test/core/options.rb +134 -0
  28. data/lib/infinity_test/core/runner.rb +18 -0
  29. data/lib/infinity_test/core/version.rb +5 -0
  30. data/lib/infinity_test/framework/base.rb +57 -0
  31. data/lib/infinity_test/framework/padrino.rb +33 -0
  32. data/lib/infinity_test/framework/rails.rb +35 -0
  33. data/lib/infinity_test/framework/rubygems.rb +29 -0
  34. data/lib/infinity_test/framework/shared_example.rb +47 -0
  35. data/lib/infinity_test/observer/base.rb +40 -0
  36. data/lib/infinity_test/observer/filewatcher.rb +72 -0
  37. data/lib/infinity_test/observer/listen.rb +74 -0
  38. data/lib/infinity_test/observer/shared_example.rb +35 -0
  39. data/lib/infinity_test/old_dsl/configuration.rb +26 -0
  40. data/lib/infinity_test/strategy/base.rb +34 -0
  41. data/lib/infinity_test/strategy/rbenv.rb +32 -0
  42. data/lib/infinity_test/strategy/ruby_default.rb +20 -0
  43. data/lib/infinity_test/strategy/rvm.rb +50 -0
  44. data/lib/infinity_test/strategy/shared_example.rb +32 -0
  45. data/lib/infinity_test/test_framework/base.rb +64 -0
  46. data/lib/infinity_test/test_framework/rspec.rb +48 -0
  47. data/lib/infinity_test/test_framework/shared_example.rb +56 -0
  48. data/lib/infinity_test/test_framework/test_unit.rb +57 -0
  49. data/lib/infinity_test.rb +53 -35
  50. data/spec/infinity_test/core/auto_discover_spec.rb +149 -0
  51. data/spec/infinity_test/core/base_spec.rb +240 -0
  52. data/spec/infinity_test/core/callback_spec.rb +89 -0
  53. data/spec/infinity_test/core/changed_file_spec.rb +26 -0
  54. data/spec/infinity_test/core/command_builder_spec.rb +38 -0
  55. data/spec/infinity_test/core/configuration_merge_spec.rb +124 -0
  56. data/spec/infinity_test/core/continuous_test_server_spec.rb +116 -0
  57. data/spec/infinity_test/core/load_configuration_spec.rb +43 -0
  58. data/spec/infinity_test/core/notifier_spec.rb +151 -0
  59. data/spec/infinity_test/core/options_spec.rb +168 -0
  60. data/spec/infinity_test/core/runner_spec.rb +17 -0
  61. data/spec/infinity_test/framework/base_spec.rb +55 -0
  62. data/spec/infinity_test/framework/padrino_spec.rb +36 -0
  63. data/spec/infinity_test/framework/rails_spec.rb +36 -0
  64. data/spec/infinity_test/framework/rubygems_spec.rb +34 -0
  65. data/spec/infinity_test/observer/base_spec.rb +78 -0
  66. data/spec/infinity_test/observer/filewatcher_spec.rb +51 -0
  67. data/spec/infinity_test/observer/listen_spec.rb +50 -0
  68. data/spec/infinity_test/{builder_spec.rb → strategy/base_spec.rb} +1 -2
  69. data/spec/infinity_test/strategy/rbenv_spec.rb +53 -0
  70. data/spec/infinity_test/strategy/ruby_default_spec.rb +32 -0
  71. data/spec/infinity_test/strategy/rvm_spec.rb +69 -0
  72. data/spec/infinity_test/test_framework/rspec_spec.rb +119 -0
  73. data/spec/infinity_test/test_framework/test_unit_spec.rb +193 -0
  74. data/spec/spec_helper.rb +34 -119
  75. metadata +272 -176
  76. data/.rvmrc +0 -1
  77. data/Gemfile.lock +0 -62
  78. data/Readme.markdown +0 -147
  79. data/Tasks +0 -4
  80. data/VERSION.yml +0 -5
  81. data/buzz_images/buzz_lightyear.jpg +0 -0
  82. data/buzz_images/buzz_lightyear_continencia.gif +0 -0
  83. data/buzz_images/to_infinity_and_beyond.png +0 -0
  84. data/features/heuristics.feature +0 -23
  85. data/features/support/env.rb +0 -2
  86. data/images/fuuu/sucess.png +0 -0
  87. data/lib/infinity_test/application.rb +0 -362
  88. data/lib/infinity_test/application_library/rails.rb +0 -94
  89. data/lib/infinity_test/application_library/rubygems.rb +0 -43
  90. data/lib/infinity_test/binary_path.rb +0 -43
  91. data/lib/infinity_test/builder.rb +0 -66
  92. data/lib/infinity_test/command.rb +0 -58
  93. data/lib/infinity_test/configuration.rb +0 -277
  94. data/lib/infinity_test/continuous_testing.rb +0 -40
  95. data/lib/infinity_test/dependencies.rb +0 -80
  96. data/lib/infinity_test/environment.rb +0 -15
  97. data/lib/infinity_test/heuristics.rb +0 -36
  98. data/lib/infinity_test/heuristics_helper.rb +0 -9
  99. data/lib/infinity_test/options.rb +0 -96
  100. data/lib/infinity_test/runner.rb +0 -38
  101. data/lib/infinity_test/test_framework.rb +0 -110
  102. data/lib/infinity_test/test_library/bacon.rb +0 -55
  103. data/lib/infinity_test/test_library/cucumber.rb +0 -22
  104. data/lib/infinity_test/test_library/rspec.rb +0 -60
  105. data/lib/infinity_test/test_library/test_unit.rb +0 -52
  106. data/lib/infinity_test/test_unit_loader.rb +0 -5
  107. data/spec/factories/buzz/lib/buzz.rb +0 -0
  108. data/spec/factories/buzz/spec/buzz_spec.rb +0 -0
  109. data/spec/factories/company/Gemfile +0 -0
  110. data/spec/factories/company/lib/company.rb +0 -0
  111. data/spec/factories/company/test/company_test.rb +0 -0
  112. data/spec/factories/images/failure.png +0 -0
  113. data/spec/factories/images/pending.png +0 -0
  114. data/spec/factories/images/sucess.png +0 -0
  115. data/spec/factories/infinity_test +0 -5
  116. data/spec/factories/infinity_test_example +0 -7
  117. data/spec/factories/slinky/spec/slinky/slinky_spec.rb +0 -0
  118. data/spec/factories/travel/lib/travel.rb +0 -0
  119. data/spec/factories/travel/test/partner_test.rb +0 -0
  120. data/spec/factories/travel/test/travel_test.rb +0 -0
  121. data/spec/factories/wood/lib/wood.rb +0 -0
  122. data/spec/factories/wood/spec/wood_spec.rb +0 -0
  123. data/spec/infinity_test/application_library/rails_spec.rb +0 -140
  124. data/spec/infinity_test/application_library/rubygems_spec.rb +0 -52
  125. data/spec/infinity_test/application_spec.rb +0 -434
  126. data/spec/infinity_test/binary_path_spec.rb +0 -72
  127. data/spec/infinity_test/command_spec.rb +0 -53
  128. data/spec/infinity_test/configuration_spec.rb +0 -382
  129. data/spec/infinity_test/continuous_testing_spec.rb +0 -25
  130. data/spec/infinity_test/environment_spec.rb +0 -23
  131. data/spec/infinity_test/heuristics_helper_spec.rb +0 -15
  132. data/spec/infinity_test/heuristics_spec.rb +0 -127
  133. data/spec/infinity_test/options_spec.rb +0 -111
  134. data/spec/infinity_test/runner_spec.rb +0 -42
  135. data/spec/infinity_test/test_framework_spec.rb +0 -127
  136. data/spec/infinity_test/test_library/bacon_spec.rb +0 -150
  137. data/spec/infinity_test/test_library/cucumber_spec.rb +0 -8
  138. data/spec/infinity_test/test_library/rspec_spec.rb +0 -189
  139. data/spec/infinity_test/test_library/test_unit_spec.rb +0 -184
  140. data/spec/infinity_test_spec.rb +0 -40
  141. /data/images/faces/{sucess.png → success.png} +0 -0
  142. /data/images/hands/{sucess.png → success.png} +0 -0
  143. /data/images/mario_bros/{sucess.jpg → success.jpg} +0 -0
  144. /data/images/rails/{sucess.png → success.png} +0 -0
  145. /data/images/rubies/{sucess.png → success.png} +0 -0
  146. /data/images/simpson/{sucess.jpg → success.jpg} +0 -0
  147. /data/images/street_fighter/{sucess.jpg → success.jpg} +0 -0
  148. /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