infinity_test 2.0.0.rc1 → 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.
- checksums.yaml +4 -4
- data/HISTORY.md +84 -0
- data/README.md +249 -9
- data/TODO.markdown +36 -27
- data/lib/infinity_test/core/auto_discover.rb +3 -3
- data/lib/infinity_test/core/command_runner.rb +16 -40
- data/lib/infinity_test/core/continuous_test_server.rb +18 -0
- data/lib/infinity_test/core/version.rb +1 -1
- data/lib/infinity_test/framework/base.rb +36 -0
- data/lib/infinity_test/framework/django.rb +109 -0
- data/lib/infinity_test/framework/elixir_mix.rb +47 -0
- data/lib/infinity_test/framework/fast_api.rb +104 -0
- data/lib/infinity_test/framework/padrino.rb +5 -8
- data/lib/infinity_test/framework/phoenix.rb +72 -0
- data/lib/infinity_test/framework/python_package.rb +97 -0
- data/lib/infinity_test/framework/rails.rb +5 -14
- data/lib/infinity_test/framework/rocket.rb +70 -0
- data/lib/infinity_test/framework/rust_cargo.rb +69 -0
- data/lib/infinity_test/strategy/base.rb +17 -1
- data/lib/infinity_test/strategy/elixir_default.rb +20 -0
- data/lib/infinity_test/strategy/python_default.rb +22 -0
- data/lib/infinity_test/strategy/rbenv.rb +3 -1
- data/lib/infinity_test/strategy/ruby_default.rb +2 -1
- data/lib/infinity_test/strategy/rust_default.rb +21 -0
- data/lib/infinity_test/strategy/rvm.rb +3 -1
- data/lib/infinity_test/test_framework/cargo_test.rb +49 -0
- data/lib/infinity_test/test_framework/ex_unit.rb +53 -0
- data/lib/infinity_test/test_framework/pytest.rb +65 -0
- data/lib/infinity_test.rb +13 -0
- data/spec/infinity_test/core/auto_discover_spec.rb +29 -3
- data/spec/infinity_test/framework/django_spec.rb +95 -0
- data/spec/infinity_test/framework/elixir_mix_spec.rb +44 -0
- data/spec/infinity_test/framework/fast_api_spec.rb +96 -0
- data/spec/infinity_test/framework/padrino_spec.rb +28 -6
- data/spec/infinity_test/framework/phoenix_spec.rb +85 -0
- data/spec/infinity_test/framework/python_package_spec.rb +95 -0
- data/spec/infinity_test/framework/rails_spec.rb +28 -6
- data/spec/infinity_test/framework/rocket_spec.rb +69 -0
- data/spec/infinity_test/framework/rust_cargo_spec.rb +94 -0
- data/spec/infinity_test/strategy/elixir_default_spec.rb +46 -0
- data/spec/infinity_test/strategy/python_default_spec.rb +56 -0
- data/spec/infinity_test/strategy/rbenv_spec.rb +19 -2
- data/spec/infinity_test/strategy/ruby_default_spec.rb +19 -2
- data/spec/infinity_test/strategy/rust_default_spec.rb +56 -0
- data/spec/infinity_test/strategy/rvm_spec.rb +23 -6
- data/spec/infinity_test/test_framework/cargo_test_spec.rb +145 -0
- data/spec/infinity_test/test_framework/ex_unit_spec.rb +153 -0
- data/spec/infinity_test/test_framework/pytest_spec.rb +182 -0
- metadata +47 -5
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module InfinityTest
|
|
4
|
+
module TestFramework
|
|
5
|
+
describe CargoTest do
|
|
6
|
+
it_should_behave_like 'a infinity test test framework'
|
|
7
|
+
|
|
8
|
+
describe "#test_dir" do
|
|
9
|
+
it "returns tests as test dir" do
|
|
10
|
+
expect(subject.test_dir).to eq 'tests'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
describe '#test_files' do
|
|
15
|
+
context 'when is empty' do
|
|
16
|
+
it 'returns empty string' do
|
|
17
|
+
expect(subject.test_files).to eq ''
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
context 'when assign the test files' do
|
|
22
|
+
it 'returns the assigned value' do
|
|
23
|
+
subject.test_files = 'user'
|
|
24
|
+
expect(subject.test_files).to eq 'user'
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe "#test_helper_file" do
|
|
30
|
+
it "is Cargo.toml" do
|
|
31
|
+
expect(subject.test_helper_file).to eq 'Cargo.toml'
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
describe "#binary" do
|
|
36
|
+
it "returns cargo as binary" do
|
|
37
|
+
expect(subject.binary).to eq 'cargo'
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe '#test_message' do
|
|
42
|
+
subject(:cargo_test) { CargoTest.new }
|
|
43
|
+
|
|
44
|
+
it 'returns the final test results' do
|
|
45
|
+
cargo_test.test_message = "test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out"
|
|
46
|
+
expect(cargo_test.test_message).to eq 'test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out'
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
describe '#success?' do
|
|
51
|
+
subject(:cargo_test) { CargoTest.new }
|
|
52
|
+
|
|
53
|
+
context 'when all tests pass' do
|
|
54
|
+
before do
|
|
55
|
+
cargo_test.test_message = "test result: ok. 5 passed; 0 failed; 0 ignored"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it 'returns true' do
|
|
59
|
+
expect(cargo_test).to be_success
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
context 'when there are failures' do
|
|
64
|
+
before do
|
|
65
|
+
cargo_test.test_message = "test result: FAILED. 3 passed; 2 failed; 0 ignored"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
it 'returns false' do
|
|
69
|
+
expect(cargo_test).to_not be_success
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
context 'when there are ignored tests' do
|
|
74
|
+
before do
|
|
75
|
+
cargo_test.test_message = "test result: ok. 4 passed; 0 failed; 1 ignored"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
it 'returns false' do
|
|
79
|
+
expect(cargo_test).to_not be_success
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
describe '#failure?' do
|
|
85
|
+
subject(:cargo_test) { CargoTest.new }
|
|
86
|
+
|
|
87
|
+
context 'when there are failures' do
|
|
88
|
+
before do
|
|
89
|
+
cargo_test.test_message = "test result: FAILED. 3 passed; 2 failed; 0 ignored"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
it 'returns true' do
|
|
93
|
+
expect(cargo_test).to be_failure
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
context 'when all tests pass' do
|
|
98
|
+
before do
|
|
99
|
+
cargo_test.test_message = "test result: ok. 5 passed; 0 failed; 0 ignored"
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
it 'returns false' do
|
|
103
|
+
expect(cargo_test).to_not be_failure
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
describe '#pending?' do
|
|
109
|
+
subject(:cargo_test) { CargoTest.new }
|
|
110
|
+
|
|
111
|
+
context 'when there are ignored tests' do
|
|
112
|
+
before do
|
|
113
|
+
cargo_test.test_message = "test result: ok. 4 passed; 0 failed; 1 ignored"
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
it 'returns true' do
|
|
117
|
+
expect(cargo_test).to be_pending
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
context 'when no tests are ignored' do
|
|
122
|
+
before do
|
|
123
|
+
cargo_test.test_message = "test result: ok. 5 passed; 0 failed; 0 ignored"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
it 'returns false' do
|
|
127
|
+
expect(cargo_test).to_not be_pending
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
describe '.run?' do
|
|
133
|
+
it 'returns true if Cargo.toml exists' do
|
|
134
|
+
allow(File).to receive(:exist?).with('Cargo.toml').and_return(true)
|
|
135
|
+
expect(CargoTest).to be_run
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
it 'returns false if Cargo.toml does not exist' do
|
|
139
|
+
allow(File).to receive(:exist?).with('Cargo.toml').and_return(false)
|
|
140
|
+
expect(CargoTest).not_to be_run
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
end
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module InfinityTest
|
|
4
|
+
module TestFramework
|
|
5
|
+
describe ExUnit do
|
|
6
|
+
it_should_behave_like 'a infinity test test framework'
|
|
7
|
+
|
|
8
|
+
describe "#test_dir" do
|
|
9
|
+
it "returns test as test dir" do
|
|
10
|
+
expect(subject.test_dir).to eq 'test'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
describe '#test_files' do
|
|
15
|
+
context 'when is empty' do
|
|
16
|
+
it 'returns the test dir' do
|
|
17
|
+
expect(subject.test_files).to eq 'test'
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
context 'when assign the test files' do
|
|
22
|
+
it 'returns the assigned value' do
|
|
23
|
+
subject.test_files = 'test/my_app/user_test.exs'
|
|
24
|
+
expect(subject.test_files).to eq 'test/my_app/user_test.exs'
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe "#test_helper_file" do
|
|
30
|
+
it "is the test helper" do
|
|
31
|
+
expect(subject.test_helper_file).to eq 'test/test_helper.exs'
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
describe "#binary" do
|
|
36
|
+
it "returns mix as binary" do
|
|
37
|
+
expect(subject.binary).to eq 'mix'
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe '#test_message' do
|
|
42
|
+
subject(:ex_unit) { ExUnit.new }
|
|
43
|
+
|
|
44
|
+
it 'returns the final test results' do
|
|
45
|
+
ex_unit.test_message = "Finished in 0.1 seconds (0.1s async, 0.0s sync)\n3 tests, 0 failures"
|
|
46
|
+
expect(ex_unit.test_message).to eq '3 tests, 0 failures'
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
describe '#success?' do
|
|
51
|
+
subject(:ex_unit) { ExUnit.new }
|
|
52
|
+
|
|
53
|
+
context 'when is test message with ZERO failures and ZERO skipped' do
|
|
54
|
+
before do
|
|
55
|
+
ex_unit.test_message = "3 tests, 0 failures"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it 'returns true' do
|
|
59
|
+
expect(ex_unit).to be_success
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
context 'when is test message with ONE failure and ZERO skipped' do
|
|
64
|
+
before do
|
|
65
|
+
ex_unit.test_message = "3 tests, 1 failure"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
it 'returns false' do
|
|
69
|
+
expect(ex_unit).to_not be_success
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
context 'when is test message with ZERO failures and ONE skipped' do
|
|
74
|
+
before do
|
|
75
|
+
ex_unit.test_message = "3 tests, 0 failures, 1 skipped"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
it 'returns false' do
|
|
79
|
+
expect(ex_unit).to_not be_success
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
describe '#failure?' do
|
|
85
|
+
subject(:ex_unit) { ExUnit.new }
|
|
86
|
+
|
|
87
|
+
context 'when is test message with ONE failure' do
|
|
88
|
+
before do
|
|
89
|
+
ex_unit.test_message = "3 tests, 1 failure"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
it 'returns true' do
|
|
93
|
+
expect(ex_unit).to be_failure
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
context 'when is test message with ZERO failures' do
|
|
98
|
+
before do
|
|
99
|
+
ex_unit.test_message = "3 tests, 0 failures"
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
it 'returns false' do
|
|
103
|
+
expect(ex_unit).to_not be_failure
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
describe '#pending?' do
|
|
109
|
+
subject(:ex_unit) { ExUnit.new }
|
|
110
|
+
|
|
111
|
+
context 'when is test message with skipped tests' do
|
|
112
|
+
before do
|
|
113
|
+
ex_unit.test_message = "3 tests, 0 failures, 1 skipped"
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
it 'returns true' do
|
|
117
|
+
expect(ex_unit).to be_pending
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
context 'when is test message without skipped tests' do
|
|
122
|
+
before do
|
|
123
|
+
ex_unit.test_message = "3 tests, 0 failures"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
it 'returns false' do
|
|
127
|
+
expect(ex_unit).to_not be_pending
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
describe '.run?' do
|
|
133
|
+
it 'returns true if test dir exists and has exs test files' do
|
|
134
|
+
allow(File).to receive(:exist?).with('test').and_return(true)
|
|
135
|
+
allow(File).to receive(:exist?).with('test/test_helper.exs').and_return(false)
|
|
136
|
+
allow(Dir).to receive(:[]).with('test/**/*_test.exs').and_return(['test/my_app_test.exs'])
|
|
137
|
+
expect(ExUnit).to be_run
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
it 'returns true if test_helper.exs exists' do
|
|
141
|
+
allow(File).to receive(:exist?).with('test').and_return(true)
|
|
142
|
+
allow(File).to receive(:exist?).with('test/test_helper.exs').and_return(true)
|
|
143
|
+
expect(ExUnit).to be_run
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
it 'returns false if no test dir' do
|
|
147
|
+
allow(File).to receive(:exist?).with('test').and_return(false)
|
|
148
|
+
expect(ExUnit).not_to be_run
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module InfinityTest
|
|
4
|
+
module TestFramework
|
|
5
|
+
describe Pytest do
|
|
6
|
+
it_should_behave_like 'a infinity test test framework'
|
|
7
|
+
|
|
8
|
+
describe "#test_dir" do
|
|
9
|
+
context "when tests directory exists" do
|
|
10
|
+
before do
|
|
11
|
+
allow(File).to receive(:exist?).with('tests').and_return(true)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it "returns tests as test dir" do
|
|
15
|
+
expect(subject.test_dir).to eq 'tests'
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
context "when test directory exists" do
|
|
20
|
+
before do
|
|
21
|
+
allow(File).to receive(:exist?).with('tests').and_return(false)
|
|
22
|
+
allow(File).to receive(:exist?).with('test').and_return(true)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "returns test as test dir" do
|
|
26
|
+
expect(subject.test_dir).to eq 'test'
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
describe '#test_files' do
|
|
32
|
+
context 'when is empty' do
|
|
33
|
+
before do
|
|
34
|
+
allow(File).to receive(:exist?).with('tests').and_return(true)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'returns the test dir' do
|
|
38
|
+
expect(subject.test_files).to eq 'tests'
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
context 'when assign the test files' do
|
|
43
|
+
it 'returns the assigned value' do
|
|
44
|
+
subject.test_files = 'tests/test_utils.py'
|
|
45
|
+
expect(subject.test_files).to eq 'tests/test_utils.py'
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
describe "#test_helper_file" do
|
|
51
|
+
before do
|
|
52
|
+
allow(File).to receive(:exist?).with('tests').and_return(true)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it "is conftest.py" do
|
|
56
|
+
expect(subject.test_helper_file).to eq 'tests/conftest.py'
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe "#binary" do
|
|
61
|
+
it "returns pytest as binary" do
|
|
62
|
+
expect(subject.binary).to eq 'pytest'
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
describe '#test_message' do
|
|
67
|
+
subject(:pytest) { Pytest.new }
|
|
68
|
+
|
|
69
|
+
it 'returns the final test results' do
|
|
70
|
+
pytest.test_message = "========================= 5 passed in 0.12s ========================="
|
|
71
|
+
expect(pytest.test_message).to eq '========================= 5 passed in 0.12s ========================='
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe '#success?' do
|
|
76
|
+
subject(:pytest) { Pytest.new }
|
|
77
|
+
|
|
78
|
+
context 'when all tests pass' do
|
|
79
|
+
before do
|
|
80
|
+
pytest.test_message = "5 passed in 0.12s"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
it 'returns true' do
|
|
84
|
+
expect(pytest).to be_success
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
context 'when there are failures' do
|
|
89
|
+
before do
|
|
90
|
+
pytest.test_message = "1 failed, 4 passed in 0.15s"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
it 'returns false' do
|
|
94
|
+
expect(pytest).to_not be_success
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
context 'when there are skipped tests' do
|
|
99
|
+
before do
|
|
100
|
+
pytest.test_message = "4 passed, 1 skipped in 0.15s"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
it 'returns false' do
|
|
104
|
+
expect(pytest).to_not be_success
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
describe '#failure?' do
|
|
110
|
+
subject(:pytest) { Pytest.new }
|
|
111
|
+
|
|
112
|
+
context 'when there are failures' do
|
|
113
|
+
before do
|
|
114
|
+
pytest.test_message = "1 failed, 4 passed in 0.15s"
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
it 'returns true' do
|
|
118
|
+
expect(pytest).to be_failure
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
context 'when all tests pass' do
|
|
123
|
+
before do
|
|
124
|
+
pytest.test_message = "5 passed in 0.12s"
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
it 'returns false' do
|
|
128
|
+
expect(pytest).to_not be_failure
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
describe '#pending?' do
|
|
134
|
+
subject(:pytest) { Pytest.new }
|
|
135
|
+
|
|
136
|
+
context 'when there are skipped tests' do
|
|
137
|
+
before do
|
|
138
|
+
pytest.test_message = "4 passed, 1 skipped in 0.15s"
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
it 'returns true' do
|
|
142
|
+
expect(pytest).to be_pending
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
context 'when no tests are skipped' do
|
|
147
|
+
before do
|
|
148
|
+
pytest.test_message = "5 passed in 0.12s"
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
it 'returns false' do
|
|
152
|
+
expect(pytest).to_not be_pending
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
describe '.run?' do
|
|
158
|
+
it 'returns true if tests dir exists with test files' do
|
|
159
|
+
allow(File).to receive(:exist?).with('tests').and_return(true)
|
|
160
|
+
allow(File).to receive(:exist?).with('test').and_return(false)
|
|
161
|
+
allow(File).to receive(:exist?).with('tests/conftest.py').and_return(false)
|
|
162
|
+
allow(File).to receive(:exist?).with('test/conftest.py').and_return(false)
|
|
163
|
+
allow(Dir).to receive(:[]).with('tests/**/test_*.py').and_return(['tests/test_utils.py'])
|
|
164
|
+
expect(Pytest).to be_run
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
it 'returns true if conftest.py exists' do
|
|
168
|
+
allow(File).to receive(:exist?).with('tests').and_return(true)
|
|
169
|
+
allow(File).to receive(:exist?).with('test').and_return(false)
|
|
170
|
+
allow(File).to receive(:exist?).with('tests/conftest.py').and_return(true)
|
|
171
|
+
expect(Pytest).to be_run
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
it 'returns false if no test directory' do
|
|
175
|
+
allow(File).to receive(:exist?).with('tests').and_return(false)
|
|
176
|
+
allow(File).to receive(:exist?).with('test').and_return(false)
|
|
177
|
+
expect(Pytest).not_to be_run
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: infinity_test
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.0.
|
|
4
|
+
version: 2.0.0.rc2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tomas D'Stefano
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-03 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: activesupport
|
|
@@ -163,6 +164,7 @@ files:
|
|
|
163
164
|
- ".rspec"
|
|
164
165
|
- AI_INTEGRATION_IDEAS.md
|
|
165
166
|
- Gemfile
|
|
167
|
+
- HISTORY.md
|
|
166
168
|
- History.markdown
|
|
167
169
|
- INFINITY_TEST
|
|
168
170
|
- LICENSE.txt
|
|
@@ -213,9 +215,16 @@ files:
|
|
|
213
215
|
- lib/infinity_test/core/runner.rb
|
|
214
216
|
- lib/infinity_test/core/version.rb
|
|
215
217
|
- lib/infinity_test/framework/base.rb
|
|
218
|
+
- lib/infinity_test/framework/django.rb
|
|
219
|
+
- lib/infinity_test/framework/elixir_mix.rb
|
|
220
|
+
- lib/infinity_test/framework/fast_api.rb
|
|
216
221
|
- lib/infinity_test/framework/padrino.rb
|
|
222
|
+
- lib/infinity_test/framework/phoenix.rb
|
|
223
|
+
- lib/infinity_test/framework/python_package.rb
|
|
217
224
|
- lib/infinity_test/framework/rails.rb
|
|
225
|
+
- lib/infinity_test/framework/rocket.rb
|
|
218
226
|
- lib/infinity_test/framework/rubygems.rb
|
|
227
|
+
- lib/infinity_test/framework/rust_cargo.rb
|
|
219
228
|
- lib/infinity_test/framework/shared_example.rb
|
|
220
229
|
- lib/infinity_test/observer/base.rb
|
|
221
230
|
- lib/infinity_test/observer/filewatcher.rb
|
|
@@ -223,11 +232,17 @@ files:
|
|
|
223
232
|
- lib/infinity_test/observer/shared_example.rb
|
|
224
233
|
- lib/infinity_test/old_dsl/configuration.rb
|
|
225
234
|
- lib/infinity_test/strategy/base.rb
|
|
235
|
+
- lib/infinity_test/strategy/elixir_default.rb
|
|
236
|
+
- lib/infinity_test/strategy/python_default.rb
|
|
226
237
|
- lib/infinity_test/strategy/rbenv.rb
|
|
227
238
|
- lib/infinity_test/strategy/ruby_default.rb
|
|
239
|
+
- lib/infinity_test/strategy/rust_default.rb
|
|
228
240
|
- lib/infinity_test/strategy/rvm.rb
|
|
229
241
|
- lib/infinity_test/strategy/shared_example.rb
|
|
230
242
|
- lib/infinity_test/test_framework/base.rb
|
|
243
|
+
- lib/infinity_test/test_framework/cargo_test.rb
|
|
244
|
+
- lib/infinity_test/test_framework/ex_unit.rb
|
|
245
|
+
- lib/infinity_test/test_framework/pytest.rb
|
|
231
246
|
- lib/infinity_test/test_framework/rspec.rb
|
|
232
247
|
- lib/infinity_test/test_framework/shared_example.rb
|
|
233
248
|
- lib/infinity_test/test_framework/test_unit.rb
|
|
@@ -243,16 +258,29 @@ files:
|
|
|
243
258
|
- spec/infinity_test/core/options_spec.rb
|
|
244
259
|
- spec/infinity_test/core/runner_spec.rb
|
|
245
260
|
- spec/infinity_test/framework/base_spec.rb
|
|
261
|
+
- spec/infinity_test/framework/django_spec.rb
|
|
262
|
+
- spec/infinity_test/framework/elixir_mix_spec.rb
|
|
263
|
+
- spec/infinity_test/framework/fast_api_spec.rb
|
|
246
264
|
- spec/infinity_test/framework/padrino_spec.rb
|
|
265
|
+
- spec/infinity_test/framework/phoenix_spec.rb
|
|
266
|
+
- spec/infinity_test/framework/python_package_spec.rb
|
|
247
267
|
- spec/infinity_test/framework/rails_spec.rb
|
|
268
|
+
- spec/infinity_test/framework/rocket_spec.rb
|
|
248
269
|
- spec/infinity_test/framework/rubygems_spec.rb
|
|
270
|
+
- spec/infinity_test/framework/rust_cargo_spec.rb
|
|
249
271
|
- spec/infinity_test/observer/base_spec.rb
|
|
250
272
|
- spec/infinity_test/observer/filewatcher_spec.rb
|
|
251
273
|
- spec/infinity_test/observer/listen_spec.rb
|
|
252
274
|
- spec/infinity_test/strategy/base_spec.rb
|
|
275
|
+
- spec/infinity_test/strategy/elixir_default_spec.rb
|
|
276
|
+
- spec/infinity_test/strategy/python_default_spec.rb
|
|
253
277
|
- spec/infinity_test/strategy/rbenv_spec.rb
|
|
254
278
|
- spec/infinity_test/strategy/ruby_default_spec.rb
|
|
279
|
+
- spec/infinity_test/strategy/rust_default_spec.rb
|
|
255
280
|
- spec/infinity_test/strategy/rvm_spec.rb
|
|
281
|
+
- spec/infinity_test/test_framework/cargo_test_spec.rb
|
|
282
|
+
- spec/infinity_test/test_framework/ex_unit_spec.rb
|
|
283
|
+
- spec/infinity_test/test_framework/pytest_spec.rb
|
|
256
284
|
- spec/infinity_test/test_framework/rspec_spec.rb
|
|
257
285
|
- spec/infinity_test/test_framework/test_unit_spec.rb
|
|
258
286
|
- spec/spec_helper.rb
|
|
@@ -289,11 +317,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
289
317
|
version: '0'
|
|
290
318
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
319
|
requirements:
|
|
292
|
-
- - "
|
|
320
|
+
- - ">"
|
|
293
321
|
- !ruby/object:Gem::Version
|
|
294
|
-
version:
|
|
322
|
+
version: 1.3.1
|
|
295
323
|
requirements: []
|
|
296
|
-
rubygems_version: 3.
|
|
324
|
+
rubygems_version: 3.3.7
|
|
325
|
+
signing_key:
|
|
297
326
|
specification_version: 4
|
|
298
327
|
summary: Infinity Test is a continuous testing library and a flexible alternative
|
|
299
328
|
to Autotest and Guard.
|
|
@@ -310,16 +339,29 @@ test_files:
|
|
|
310
339
|
- spec/infinity_test/core/options_spec.rb
|
|
311
340
|
- spec/infinity_test/core/runner_spec.rb
|
|
312
341
|
- spec/infinity_test/framework/base_spec.rb
|
|
342
|
+
- spec/infinity_test/framework/django_spec.rb
|
|
343
|
+
- spec/infinity_test/framework/elixir_mix_spec.rb
|
|
344
|
+
- spec/infinity_test/framework/fast_api_spec.rb
|
|
313
345
|
- spec/infinity_test/framework/padrino_spec.rb
|
|
346
|
+
- spec/infinity_test/framework/phoenix_spec.rb
|
|
347
|
+
- spec/infinity_test/framework/python_package_spec.rb
|
|
314
348
|
- spec/infinity_test/framework/rails_spec.rb
|
|
349
|
+
- spec/infinity_test/framework/rocket_spec.rb
|
|
315
350
|
- spec/infinity_test/framework/rubygems_spec.rb
|
|
351
|
+
- spec/infinity_test/framework/rust_cargo_spec.rb
|
|
316
352
|
- spec/infinity_test/observer/base_spec.rb
|
|
317
353
|
- spec/infinity_test/observer/filewatcher_spec.rb
|
|
318
354
|
- spec/infinity_test/observer/listen_spec.rb
|
|
319
355
|
- spec/infinity_test/strategy/base_spec.rb
|
|
356
|
+
- spec/infinity_test/strategy/elixir_default_spec.rb
|
|
357
|
+
- spec/infinity_test/strategy/python_default_spec.rb
|
|
320
358
|
- spec/infinity_test/strategy/rbenv_spec.rb
|
|
321
359
|
- spec/infinity_test/strategy/ruby_default_spec.rb
|
|
360
|
+
- spec/infinity_test/strategy/rust_default_spec.rb
|
|
322
361
|
- spec/infinity_test/strategy/rvm_spec.rb
|
|
362
|
+
- spec/infinity_test/test_framework/cargo_test_spec.rb
|
|
363
|
+
- spec/infinity_test/test_framework/ex_unit_spec.rb
|
|
364
|
+
- spec/infinity_test/test_framework/pytest_spec.rb
|
|
323
365
|
- spec/infinity_test/test_framework/rspec_spec.rb
|
|
324
366
|
- spec/infinity_test/test_framework/test_unit_spec.rb
|
|
325
367
|
- spec/spec_helper.rb
|