assert 2.18.2 → 2.18.3
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/README.md +7 -6
- data/assert.gemspec +1 -1
- data/lib/assert/actual_value.rb +127 -0
- data/lib/assert/assertions.rb +11 -20
- data/lib/assert/context.rb +13 -5
- data/lib/assert/context/let_dsl.rb +13 -0
- data/lib/assert/context/method_missing.rb +19 -0
- data/lib/assert/macros/methods.rb +4 -4
- data/lib/assert/stub.rb +4 -0
- data/lib/assert/version.rb +1 -1
- data/test/helper.rb +23 -25
- data/test/support/factory.rb +15 -0
- data/test/system/stub_tests.rb +348 -333
- data/test/system/test_tests.rb +111 -109
- data/test/unit/actual_value_tests.rb +335 -0
- data/test/unit/assert_tests.rb +84 -59
- data/test/unit/assertions/assert_block_tests.rb +32 -31
- data/test/unit/assertions/assert_empty_tests.rb +35 -32
- data/test/unit/assertions/assert_equal_tests.rb +81 -75
- data/test/unit/assertions/assert_file_exists_tests.rb +34 -33
- data/test/unit/assertions/assert_includes_tests.rb +40 -37
- data/test/unit/assertions/assert_instance_of_tests.rb +36 -33
- data/test/unit/assertions/assert_kind_of_tests.rb +36 -33
- data/test/unit/assertions/assert_match_tests.rb +36 -33
- data/test/unit/assertions/assert_nil_tests.rb +32 -31
- data/test/unit/assertions/assert_raises_tests.rb +55 -55
- data/test/unit/assertions/assert_respond_to_tests.rb +38 -35
- data/test/unit/assertions/assert_same_tests.rb +91 -80
- data/test/unit/assertions/assert_true_false_tests.rb +64 -60
- data/test/unit/assertions_tests.rb +15 -13
- data/test/unit/config_helpers_tests.rb +36 -35
- data/test/unit/config_tests.rb +33 -34
- data/test/unit/context/let_dsl_tests.rb +10 -0
- data/test/unit/context/setup_dsl_tests.rb +70 -81
- data/test/unit/context/subject_dsl_tests.rb +16 -43
- data/test/unit/context/suite_dsl_tests.rb +16 -16
- data/test/unit/context/test_dsl_tests.rb +50 -54
- data/test/unit/context_info_tests.rb +16 -15
- data/test/unit/context_tests.rb +170 -157
- data/test/unit/default_runner_tests.rb +2 -5
- data/test/unit/default_suite_tests.rb +51 -53
- data/test/unit/factory_tests.rb +3 -3
- data/test/unit/file_line_tests.rb +31 -33
- data/test/unit/macro_tests.rb +9 -10
- data/test/unit/result_tests.rb +150 -163
- data/test/unit/runner_tests.rb +63 -63
- data/test/unit/suite_tests.rb +57 -54
- data/test/unit/test_tests.rb +134 -126
- data/test/unit/utils_tests.rb +41 -45
- data/test/unit/view_helpers_tests.rb +55 -52
- data/test/unit/view_tests.rb +20 -22
- metadata +11 -4
@@ -8,27 +8,28 @@ module Assert::Assertions
|
|
8
8
|
include Assert::Test::TestHelpers
|
9
9
|
|
10
10
|
desc "`assert_true`"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
subject { test1 }
|
12
|
+
|
13
|
+
let(:desc1) { "assert true fail desc" }
|
14
|
+
let(:args1) { ["whatever", desc1] }
|
15
|
+
let(:test1) {
|
16
|
+
args = args1
|
17
|
+
Factory.test do
|
15
18
|
assert_true(true) # pass
|
16
19
|
assert_true(*args) # fail
|
17
20
|
end
|
18
|
-
|
19
|
-
|
20
|
-
end
|
21
|
-
subject{ @test }
|
21
|
+
}
|
22
|
+
let(:config1) { test1.config }
|
22
23
|
|
23
24
|
should "produce results as expected" do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
subject.run(&test_run_callback)
|
26
|
+
|
27
|
+
assert_that(test_run_result_count).equals(2)
|
28
|
+
assert_that(test_run_result_count(:pass)).equals(1)
|
29
|
+
assert_that(test_run_result_count(:fail)).equals(1)
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
assert_equal exp, test_run_results(:fail).first.message
|
31
|
+
exp = "#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to be true."
|
32
|
+
assert_that(test_run_results(:fail).first.message).equals(exp)
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
@@ -36,27 +37,28 @@ module Assert::Assertions
|
|
36
37
|
include Assert::Test::TestHelpers
|
37
38
|
|
38
39
|
desc "`assert_not_true`"
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
subject { test1 }
|
41
|
+
|
42
|
+
let(:desc1) { "assert not true fail desc" }
|
43
|
+
let(:args1) { [true, desc1] }
|
44
|
+
let(:test1) {
|
45
|
+
args = args1
|
46
|
+
Factory.test do
|
43
47
|
assert_not_true(false) # pass
|
44
48
|
assert_not_true(*args) # fail
|
45
49
|
end
|
46
|
-
|
47
|
-
|
48
|
-
end
|
49
|
-
subject{ @test }
|
50
|
+
}
|
51
|
+
let(:config1) { test1.config }
|
50
52
|
|
51
53
|
should "produce results as expected" do
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
54
|
+
subject.run(&test_run_callback)
|
55
|
+
|
56
|
+
assert_that(test_run_result_count).equals(2)
|
57
|
+
assert_that(test_run_result_count(:pass)).equals(1)
|
58
|
+
assert_that(test_run_result_count(:fail)).equals(1)
|
56
59
|
|
57
|
-
|
58
|
-
|
59
|
-
assert_equal exp, test_run_results(:fail).first.message
|
60
|
+
exp = "#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to not be true."
|
61
|
+
assert_that(test_run_results(:fail).first.message).equals(exp)
|
60
62
|
end
|
61
63
|
end
|
62
64
|
|
@@ -64,27 +66,28 @@ module Assert::Assertions
|
|
64
66
|
include Assert::Test::TestHelpers
|
65
67
|
|
66
68
|
desc "`assert_false`"
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
69
|
+
subject { test1 }
|
70
|
+
|
71
|
+
let(:desc1) { "assert false fail desc" }
|
72
|
+
let(:args1) { ["whatever", desc1] }
|
73
|
+
let(:test1) {
|
74
|
+
args = args1
|
75
|
+
Factory.test do
|
71
76
|
assert_false(false) # pass
|
72
77
|
assert_false(*args) # fail
|
73
78
|
end
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
subject{ @test }
|
79
|
+
}
|
80
|
+
let(:config1) { test1.config }
|
78
81
|
|
79
82
|
should "produce results as expected" do
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
83
|
+
subject.run(&test_run_callback)
|
84
|
+
|
85
|
+
assert_that(test_run_result_count).equals(2)
|
86
|
+
assert_that(test_run_result_count(:pass)).equals(1)
|
87
|
+
assert_that(test_run_result_count(:fail)).equals(1)
|
84
88
|
|
85
|
-
|
86
|
-
|
87
|
-
assert_equal exp, test_run_results(:fail).first.message
|
89
|
+
exp = "#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to be false."
|
90
|
+
assert_that(test_run_results(:fail).first.message).equals(exp)
|
88
91
|
end
|
89
92
|
end
|
90
93
|
|
@@ -92,27 +95,28 @@ module Assert::Assertions
|
|
92
95
|
include Assert::Test::TestHelpers
|
93
96
|
|
94
97
|
desc "`assert_not_false`"
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
98
|
+
subject { test1 }
|
99
|
+
|
100
|
+
let(:desc1) { "assert not false fail desc" }
|
101
|
+
let(:args1) { [false, desc1] }
|
102
|
+
let(:test1) {
|
103
|
+
args = args1
|
104
|
+
Factory.test do
|
99
105
|
assert_not_false(true) # pass
|
100
106
|
assert_not_false(*args) # fail
|
101
107
|
end
|
102
|
-
|
103
|
-
|
104
|
-
end
|
105
|
-
subject{ @test }
|
108
|
+
}
|
109
|
+
let(:config1) { test1.config }
|
106
110
|
|
107
111
|
should "produce results as expected" do
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
+
subject.run(&test_run_callback)
|
113
|
+
|
114
|
+
assert_that(test_run_result_count).equals(2)
|
115
|
+
assert_that(test_run_result_count(:pass)).equals(1)
|
116
|
+
assert_that(test_run_result_count(:fail)).equals(1)
|
112
117
|
|
113
|
-
|
114
|
-
|
115
|
-
assert_equal exp, test_run_results(:fail).first.message
|
118
|
+
exp = "#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to not be false."
|
119
|
+
assert_that(test_run_results(:fail).first.message).equals(exp)
|
116
120
|
end
|
117
121
|
end
|
118
122
|
end
|
@@ -6,12 +6,11 @@ module Assert::Assertions
|
|
6
6
|
include Assert::Test::TestHelpers
|
7
7
|
|
8
8
|
desc "Assert::Context"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
subject{ @context }
|
9
|
+
subject { context1 }
|
10
|
+
|
11
|
+
let(:context_class1) { Factory.modes_off_context_class }
|
12
|
+
let(:test1) { Factory.test }
|
13
|
+
let(:context1) { context_class1.new(test1, test1.config, proc { |r| }) }
|
15
14
|
|
16
15
|
should have_imeths :assert_block, :assert_not_block, :refute_block
|
17
16
|
should have_imeths :assert_raises, :assert_not_raises
|
@@ -37,21 +36,24 @@ module Assert::Assertions
|
|
37
36
|
class IgnoredTests < UnitTests
|
38
37
|
desc "ignored assertions helpers"
|
39
38
|
setup do
|
40
|
-
|
41
|
-
|
39
|
+
tests.each{ |test| test.run(&test_run_callback) }
|
40
|
+
end
|
41
|
+
|
42
|
+
let(:tests) {
|
43
|
+
context_info = Factory.context_info(context_class1)
|
44
|
+
Assert::Assertions::IGNORED_ASSERTION_HELPERS.map do |helper|
|
42
45
|
Factory.test("ignored assertion helper #{helper}", context_info) do
|
43
46
|
self.send(helper, "doesn't matter")
|
44
47
|
end
|
45
48
|
end
|
46
|
-
|
47
|
-
end
|
49
|
+
}
|
48
50
|
|
49
51
|
should "have an ignored result for each helper in the constant" do
|
50
52
|
exp = Assert::Assertions::IGNORED_ASSERTION_HELPERS.size
|
51
|
-
|
53
|
+
assert_that(test_run_result_count).equals(exp)
|
52
54
|
|
53
55
|
test_run_results.each do |result|
|
54
|
-
|
56
|
+
assert_that(result).is_kind_of(Assert::Result::Ignore)
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
@@ -60,7 +62,7 @@ module Assert::Assertions
|
|
60
62
|
"The assertion `#{helper}` is not supported."\
|
61
63
|
" Please use another assertion or the basic `assert`."
|
62
64
|
end
|
63
|
-
|
65
|
+
assert_that(test_run_results.collect(&:message)).equals(exp)
|
64
66
|
end
|
65
67
|
end
|
66
68
|
end
|
@@ -6,8 +6,10 @@ require "assert/config"
|
|
6
6
|
module Assert::ConfigHelpers
|
7
7
|
class UnitTests < Assert::Context
|
8
8
|
desc "Assert::ConfigHelpers"
|
9
|
-
|
10
|
-
|
9
|
+
subject { helpers1 }
|
10
|
+
|
11
|
+
let(:helpers_class1) {
|
12
|
+
Class.new do
|
11
13
|
include Assert::ConfigHelpers
|
12
14
|
|
13
15
|
def config
|
@@ -16,9 +18,8 @@ module Assert::ConfigHelpers
|
|
16
18
|
@config ||= [Assert.config, Assert::Config.new].sample
|
17
19
|
end
|
18
20
|
end
|
19
|
-
|
20
|
-
|
21
|
-
subject{ @helpers }
|
21
|
+
}
|
22
|
+
let(:helpers1) { helpers_class1.new }
|
22
23
|
|
23
24
|
should have_imeths :runner, :suite, :view
|
24
25
|
should have_imeths :runner_seed, :single_test?, :single_test_file_line
|
@@ -34,67 +35,67 @@ module Assert::ConfigHelpers
|
|
34
35
|
should have_imeths :ocurring_result_types
|
35
36
|
|
36
37
|
should "know the config's runner, suite and view" do
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
assert_that(subject.runner).equals(subject.config.runner)
|
39
|
+
assert_that(subject.suite).equals(subject.config.suite)
|
40
|
+
assert_that(subject.view).equals(subject.config.view)
|
40
41
|
end
|
41
42
|
|
42
43
|
should "know its runner seed" do
|
43
|
-
|
44
|
+
assert_that(subject.runner_seed).equals(subject.config.runner_seed)
|
44
45
|
end
|
45
46
|
|
46
47
|
should "know if it is in single test mode" do
|
47
48
|
Assert.stub(subject.config, :single_test?){ true }
|
48
|
-
|
49
|
+
assert_that(subject.single_test?).is_true
|
49
50
|
|
50
51
|
Assert.stub(subject.config, :single_test?){ false }
|
51
|
-
|
52
|
+
assert_that(subject.single_test?).is_false
|
52
53
|
end
|
53
54
|
|
54
55
|
should "know its single test file line" do
|
55
56
|
exp = subject.config.single_test_file_line
|
56
|
-
|
57
|
+
assert_that(subject.single_test_file_line).equals(exp)
|
57
58
|
end
|
58
59
|
|
59
60
|
should "know its tests-to-run attrs" do
|
60
61
|
exp = subject.config.suite.tests_to_run?
|
61
|
-
|
62
|
+
assert_that(subject.tests_to_run?).equals(exp)
|
62
63
|
|
63
64
|
exp = subject.config.suite.tests_to_run_count
|
64
|
-
|
65
|
+
assert_that(subject.tests_to_run_count).equals(exp)
|
65
66
|
end
|
66
67
|
|
67
68
|
should "know its test/result counts" do
|
68
69
|
exp = subject.config.suite.test_count
|
69
|
-
|
70
|
+
assert_that(subject.test_count).equals(exp)
|
70
71
|
|
71
72
|
exp = subject.config.suite.result_count
|
72
|
-
|
73
|
+
assert_that(subject.result_count).equals(exp)
|
73
74
|
|
74
75
|
exp = subject.config.suite.pass_result_count
|
75
|
-
|
76
|
+
assert_that(subject.pass_result_count).equals(exp)
|
76
77
|
|
77
78
|
exp = subject.config.suite.fail_result_count
|
78
|
-
|
79
|
+
assert_that(subject.fail_result_count).equals(exp)
|
79
80
|
|
80
81
|
exp = subject.config.suite.error_result_count
|
81
|
-
|
82
|
+
assert_that(subject.error_result_count).equals(exp)
|
82
83
|
|
83
84
|
exp = subject.config.suite.skip_result_count
|
84
|
-
|
85
|
+
assert_that(subject.skip_result_count).equals(exp)
|
85
86
|
|
86
87
|
exp = subject.config.suite.ignore_result_count
|
87
|
-
|
88
|
+
assert_that(subject.ignore_result_count).equals(exp)
|
88
89
|
end
|
89
90
|
|
90
91
|
should "know if all tests are passing or not" do
|
91
92
|
result_count = Factory.integer
|
92
93
|
Assert.stub(subject, :result_count){ result_count }
|
93
94
|
Assert.stub(subject, :pass_result_count){ result_count }
|
94
|
-
|
95
|
+
assert_that(subject.all_pass?).is_true
|
95
96
|
|
96
97
|
Assert.stub(subject, :pass_result_count){ Factory.integer }
|
97
|
-
|
98
|
+
assert_that(subject.all_pass?).is_false
|
98
99
|
end
|
99
100
|
|
100
101
|
should "know its formatted run time, test rate and result rate" do
|
@@ -102,39 +103,39 @@ module Assert::ConfigHelpers
|
|
102
103
|
|
103
104
|
run_time = Factory.float
|
104
105
|
exp = format % run_time
|
105
|
-
|
106
|
-
|
106
|
+
assert_that(subject.formatted_run_time(run_time, format)).equals(exp)
|
107
|
+
assert_that(subject.formatted_run_time(run_time)).equals(exp)
|
107
108
|
|
108
109
|
test_rate = Factory.float
|
109
110
|
exp = format % test_rate
|
110
|
-
|
111
|
-
|
111
|
+
assert_that(subject.formatted_result_rate(test_rate, format)).equals(exp)
|
112
|
+
assert_that(subject.formatted_result_rate(test_rate)).equals(exp)
|
112
113
|
|
113
114
|
result_rate = Factory.float
|
114
115
|
exp = format % result_rate
|
115
|
-
|
116
|
-
|
116
|
+
assert_that(subject.formatted_result_rate(result_rate, format)).equals(exp)
|
117
|
+
assert_that(subject.formatted_result_rate(result_rate)).equals(exp)
|
117
118
|
end
|
118
119
|
|
119
120
|
should "know its formatted suite run time, test rate and result rate" do
|
120
121
|
format = "%.6f"
|
121
122
|
|
122
123
|
exp = format % subject.config.suite.run_time
|
123
|
-
|
124
|
+
assert_that(subject.formatted_suite_run_time(format)).equals(exp)
|
124
125
|
|
125
126
|
exp = format % subject.config.suite.test_rate
|
126
|
-
|
127
|
+
assert_that(subject.formatted_suite_test_rate(format)).equals(exp)
|
127
128
|
|
128
129
|
exp = format % subject.config.suite.result_rate
|
129
|
-
|
130
|
+
assert_that(subject.formatted_suite_result_rate(format)).equals(exp)
|
130
131
|
end
|
131
132
|
|
132
133
|
should "know whether to show test profile info" do
|
133
|
-
|
134
|
+
assert_that(subject.show_test_profile_info?).equals(!!subject.config.profile)
|
134
135
|
end
|
135
136
|
|
136
137
|
should "know whether to show verbose info" do
|
137
|
-
|
138
|
+
assert_that(subject.show_test_verbose_info?).equals(!!subject.config.verbose)
|
138
139
|
end
|
139
140
|
|
140
141
|
should "know what result types occur in a suite's results" do
|
@@ -145,7 +146,7 @@ module Assert::ConfigHelpers
|
|
145
146
|
exp = result_types.select do |type_sym|
|
146
147
|
subject.send("#{type_sym}_result_count") > 0
|
147
148
|
end
|
148
|
-
|
149
|
+
assert_that(subject.ocurring_result_types).equals(exp)
|
149
150
|
end
|
150
151
|
end
|
151
152
|
end
|
data/test/unit/config_tests.rb
CHANGED
@@ -10,10 +10,9 @@ require "assert/runner"
|
|
10
10
|
class Assert::Config
|
11
11
|
class UnitTests < Assert::Context
|
12
12
|
desc "Assert::Config"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
subject{ @config }
|
13
|
+
subject { config1 }
|
14
|
+
|
15
|
+
let(:config1) { Assert::Config.new }
|
17
16
|
|
18
17
|
should have_imeths :view, :suite, :runner
|
19
18
|
should have_imeths :test_dir, :test_helper, :test_file_suffixes
|
@@ -25,73 +24,73 @@ class Assert::Config
|
|
25
24
|
should have_imeths :single_test_file_line, :single_test_file_path
|
26
25
|
|
27
26
|
should "default the view, suite, and runner" do
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
assert_that(subject.view).is_kind_of(Assert::DefaultView)
|
28
|
+
assert_that(subject.suite).is_kind_of(Assert::DefaultSuite)
|
29
|
+
assert_that(subject.runner).is_kind_of(Assert::DefaultRunner)
|
31
30
|
end
|
32
31
|
|
33
32
|
should "default the test dir/helper/suffixes" do
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
assert_that(subject.test_dir).equals("test")
|
34
|
+
assert_that(subject.test_helper).equals("helper.rb")
|
35
|
+
assert_that(subject.test_file_suffixes).equals(["_tests.rb", "_test.rb"])
|
37
36
|
end
|
38
37
|
|
39
38
|
should "default the procs" do
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
assert_that(subject.changed_proc).is_not_nil
|
40
|
+
assert_that(subject.pp_proc).is_not_nil
|
41
|
+
assert_that(subject.use_diff_proc).is_not_nil
|
42
|
+
assert_that(subject.run_diff_proc).is_not_nil
|
44
43
|
end
|
45
44
|
|
46
45
|
should "default the option settings" do
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
46
|
+
assert_that(subject.runner_seed).is_not_nil
|
47
|
+
assert_that(subject.changed_only).is_false
|
48
|
+
assert_that(subject.changed_ref).is_empty
|
49
|
+
assert_that(subject.single_test).is_empty
|
50
|
+
assert_that(subject.pp_objects).is_false
|
51
|
+
assert_that(subject.capture_output).is_false
|
52
|
+
assert_that(subject.halt_on_fail).is_true
|
53
|
+
assert_that(subject.profile).is_false
|
54
|
+
assert_that(subject.verbose).is_false
|
55
|
+
assert_that(subject.list).is_false
|
56
|
+
assert_that(subject.debug).is_false
|
58
57
|
end
|
59
58
|
|
60
59
|
should "apply settings given from a hash" do
|
61
60
|
assert subject.halt_on_fail
|
62
61
|
subject.apply(:halt_on_fail => false)
|
63
|
-
|
62
|
+
assert_that(subject.halt_on_fail).is_false
|
64
63
|
|
65
|
-
|
66
|
-
|
64
|
+
assert_that(Assert::Config.new.halt_on_fail).is_true
|
65
|
+
assert_that(Assert::Config.new(:halt_on_fail => false).halt_on_fail).is_false
|
67
66
|
end
|
68
67
|
|
69
68
|
should "know if it is in single test mode" do
|
70
|
-
|
69
|
+
assert_that(subject.single_test?).is_false
|
71
70
|
|
72
71
|
subject.apply(:single_test => Factory.string)
|
73
|
-
|
72
|
+
assert_that(subject.single_test?).is_true
|
74
73
|
end
|
75
74
|
|
76
75
|
should "know its single test file line" do
|
77
76
|
exp = Assert::FileLine.parse(File.expand_path("", Dir.pwd))
|
78
|
-
|
77
|
+
assert_that(subject.single_test_file_line).equals(exp)
|
79
78
|
|
80
79
|
file_line_path = "#{Factory.path}_tests.rb:#{Factory.integer}"
|
81
80
|
subject.apply(:single_test => file_line_path)
|
82
81
|
|
83
82
|
exp = Assert::FileLine.parse(File.expand_path(file_line_path, Dir.pwd))
|
84
|
-
|
83
|
+
assert_that(subject.single_test_file_line).equals(exp)
|
85
84
|
end
|
86
85
|
|
87
86
|
should "know its single test file path" do
|
88
87
|
exp = Assert::FileLine.parse(File.expand_path("", Dir.pwd)).file
|
89
|
-
|
88
|
+
assert_that(subject.single_test_file_path).equals(exp)
|
90
89
|
|
91
90
|
path = "#{Factory.path}_tests.rb"
|
92
91
|
file_line_path = "#{path}:#{Factory.integer}"
|
93
92
|
subject.apply(:single_test => file_line_path)
|
94
|
-
|
93
|
+
assert_that(subject.single_test_file_path).equals(File.expand_path(path, Dir.pwd))
|
95
94
|
end
|
96
95
|
end
|
97
96
|
end
|