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.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +31 -0
- data/.gitignore +3 -0
- data/.rspec +2 -2
- data/AI_INTEGRATION_IDEAS.md +203 -0
- data/Gemfile +3 -15
- data/History.markdown +82 -0
- data/{.infinity_test → INFINITY_TEST} +18 -15
- data/LICENSE.txt +2 -2
- data/README.md +627 -0
- data/Rakefile +1 -65
- data/TODO.markdown +24 -19
- data/bin/infinity_test +1 -4
- data/images/fuuu/pending.png +0 -0
- data/images/fuuu/success.png +0 -0
- data/infinity_test.gemspec +41 -189
- data/lib/infinity_test/core/auto_discover.rb +67 -0
- data/lib/infinity_test/core/base.rb +369 -0
- data/lib/infinity_test/core/callback.rb +59 -0
- data/lib/infinity_test/core/changed_file.rb +13 -0
- data/lib/infinity_test/core/command_builder.rb +48 -0
- data/lib/infinity_test/core/command_runner.rb +62 -0
- data/lib/infinity_test/core/configuration_merge.rb +37 -0
- data/lib/infinity_test/core/continuous_test_server.rb +106 -0
- data/lib/infinity_test/core/load_configuration.rb +48 -0
- data/lib/infinity_test/core/notifier.rb +59 -0
- data/lib/infinity_test/core/options.rb +134 -0
- data/lib/infinity_test/core/runner.rb +18 -0
- data/lib/infinity_test/core/version.rb +5 -0
- data/lib/infinity_test/framework/base.rb +57 -0
- data/lib/infinity_test/framework/padrino.rb +33 -0
- data/lib/infinity_test/framework/rails.rb +35 -0
- data/lib/infinity_test/framework/rubygems.rb +29 -0
- data/lib/infinity_test/framework/shared_example.rb +47 -0
- data/lib/infinity_test/observer/base.rb +40 -0
- data/lib/infinity_test/observer/filewatcher.rb +72 -0
- data/lib/infinity_test/observer/listen.rb +74 -0
- data/lib/infinity_test/observer/shared_example.rb +35 -0
- data/lib/infinity_test/old_dsl/configuration.rb +26 -0
- data/lib/infinity_test/strategy/base.rb +34 -0
- data/lib/infinity_test/strategy/rbenv.rb +32 -0
- data/lib/infinity_test/strategy/ruby_default.rb +20 -0
- data/lib/infinity_test/strategy/rvm.rb +50 -0
- data/lib/infinity_test/strategy/shared_example.rb +32 -0
- data/lib/infinity_test/test_framework/base.rb +64 -0
- data/lib/infinity_test/test_framework/rspec.rb +48 -0
- data/lib/infinity_test/test_framework/shared_example.rb +56 -0
- data/lib/infinity_test/test_framework/test_unit.rb +57 -0
- data/lib/infinity_test.rb +53 -35
- data/spec/infinity_test/core/auto_discover_spec.rb +149 -0
- data/spec/infinity_test/core/base_spec.rb +240 -0
- data/spec/infinity_test/core/callback_spec.rb +89 -0
- data/spec/infinity_test/core/changed_file_spec.rb +26 -0
- data/spec/infinity_test/core/command_builder_spec.rb +38 -0
- data/spec/infinity_test/core/configuration_merge_spec.rb +124 -0
- data/spec/infinity_test/core/continuous_test_server_spec.rb +116 -0
- data/spec/infinity_test/core/load_configuration_spec.rb +43 -0
- data/spec/infinity_test/core/notifier_spec.rb +151 -0
- data/spec/infinity_test/core/options_spec.rb +168 -0
- data/spec/infinity_test/core/runner_spec.rb +17 -0
- data/spec/infinity_test/framework/base_spec.rb +55 -0
- data/spec/infinity_test/framework/padrino_spec.rb +36 -0
- data/spec/infinity_test/framework/rails_spec.rb +36 -0
- data/spec/infinity_test/framework/rubygems_spec.rb +34 -0
- data/spec/infinity_test/observer/base_spec.rb +78 -0
- data/spec/infinity_test/observer/filewatcher_spec.rb +51 -0
- data/spec/infinity_test/observer/listen_spec.rb +50 -0
- data/spec/infinity_test/{builder_spec.rb → strategy/base_spec.rb} +1 -2
- data/spec/infinity_test/strategy/rbenv_spec.rb +53 -0
- data/spec/infinity_test/strategy/ruby_default_spec.rb +32 -0
- data/spec/infinity_test/strategy/rvm_spec.rb +69 -0
- data/spec/infinity_test/test_framework/rspec_spec.rb +119 -0
- data/spec/infinity_test/test_framework/test_unit_spec.rb +193 -0
- data/spec/spec_helper.rb +34 -119
- metadata +272 -176
- data/.rvmrc +0 -1
- data/Gemfile.lock +0 -62
- data/Readme.markdown +0 -147
- data/Tasks +0 -4
- data/VERSION.yml +0 -5
- data/buzz_images/buzz_lightyear.jpg +0 -0
- data/buzz_images/buzz_lightyear_continencia.gif +0 -0
- data/buzz_images/to_infinity_and_beyond.png +0 -0
- data/features/heuristics.feature +0 -23
- data/features/support/env.rb +0 -2
- data/images/fuuu/sucess.png +0 -0
- data/lib/infinity_test/application.rb +0 -362
- data/lib/infinity_test/application_library/rails.rb +0 -94
- data/lib/infinity_test/application_library/rubygems.rb +0 -43
- data/lib/infinity_test/binary_path.rb +0 -43
- data/lib/infinity_test/builder.rb +0 -66
- data/lib/infinity_test/command.rb +0 -58
- data/lib/infinity_test/configuration.rb +0 -277
- data/lib/infinity_test/continuous_testing.rb +0 -40
- data/lib/infinity_test/dependencies.rb +0 -80
- data/lib/infinity_test/environment.rb +0 -15
- data/lib/infinity_test/heuristics.rb +0 -36
- data/lib/infinity_test/heuristics_helper.rb +0 -9
- data/lib/infinity_test/options.rb +0 -96
- data/lib/infinity_test/runner.rb +0 -38
- data/lib/infinity_test/test_framework.rb +0 -110
- data/lib/infinity_test/test_library/bacon.rb +0 -55
- data/lib/infinity_test/test_library/cucumber.rb +0 -22
- data/lib/infinity_test/test_library/rspec.rb +0 -60
- data/lib/infinity_test/test_library/test_unit.rb +0 -52
- data/lib/infinity_test/test_unit_loader.rb +0 -5
- data/spec/factories/buzz/lib/buzz.rb +0 -0
- data/spec/factories/buzz/spec/buzz_spec.rb +0 -0
- data/spec/factories/company/Gemfile +0 -0
- data/spec/factories/company/lib/company.rb +0 -0
- data/spec/factories/company/test/company_test.rb +0 -0
- data/spec/factories/images/failure.png +0 -0
- data/spec/factories/images/pending.png +0 -0
- data/spec/factories/images/sucess.png +0 -0
- data/spec/factories/infinity_test +0 -5
- data/spec/factories/infinity_test_example +0 -7
- data/spec/factories/slinky/spec/slinky/slinky_spec.rb +0 -0
- data/spec/factories/travel/lib/travel.rb +0 -0
- data/spec/factories/travel/test/partner_test.rb +0 -0
- data/spec/factories/travel/test/travel_test.rb +0 -0
- data/spec/factories/wood/lib/wood.rb +0 -0
- data/spec/factories/wood/spec/wood_spec.rb +0 -0
- data/spec/infinity_test/application_library/rails_spec.rb +0 -140
- data/spec/infinity_test/application_library/rubygems_spec.rb +0 -52
- data/spec/infinity_test/application_spec.rb +0 -434
- data/spec/infinity_test/binary_path_spec.rb +0 -72
- data/spec/infinity_test/command_spec.rb +0 -53
- data/spec/infinity_test/configuration_spec.rb +0 -382
- data/spec/infinity_test/continuous_testing_spec.rb +0 -25
- data/spec/infinity_test/environment_spec.rb +0 -23
- data/spec/infinity_test/heuristics_helper_spec.rb +0 -15
- data/spec/infinity_test/heuristics_spec.rb +0 -127
- data/spec/infinity_test/options_spec.rb +0 -111
- data/spec/infinity_test/runner_spec.rb +0 -42
- data/spec/infinity_test/test_framework_spec.rb +0 -127
- data/spec/infinity_test/test_library/bacon_spec.rb +0 -150
- data/spec/infinity_test/test_library/cucumber_spec.rb +0 -8
- data/spec/infinity_test/test_library/rspec_spec.rb +0 -189
- data/spec/infinity_test/test_library/test_unit_spec.rb +0 -184
- data/spec/infinity_test_spec.rb +0 -40
- /data/images/faces/{sucess.png → success.png} +0 -0
- /data/images/hands/{sucess.png → success.png} +0 -0
- /data/images/mario_bros/{sucess.jpg → success.jpg} +0 -0
- /data/images/rails/{sucess.png → success.png} +0 -0
- /data/images/rubies/{sucess.png → success.png} +0 -0
- /data/images/simpson/{sucess.jpg → success.jpg} +0 -0
- /data/images/street_fighter/{sucess.jpg → success.jpg} +0 -0
- /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
|
data/spec/infinity_test_spec.rb
DELETED
|
@@ -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
|