|
3 | 3 | sampleproj_path = File.join(File.dirname(File.dirname(__FILE__)), "SampleProjects")
|
4 | 4 |
|
5 | 5 | RSpec.describe ArduinoCI::CppLibrary do
|
6 |
| - cpp_lib_path = File.join(sampleproj_path, "TestSomething") |
| 6 | + cpp_lib_path = File.join(sampleproj_path, "DoSomething") |
7 | 7 | cpp_library = ArduinoCI::CppLibrary.new(cpp_lib_path)
|
8 | 8 | context "cpp_files" do
|
9 | 9 | it "finds cpp files in directory" do
|
10 |
| - testsomething_cpp_files = ["TestSomething/test-something.cpp"] |
| 10 | + dosomething_cpp_files = ["DoSomething/do-something.cpp"] |
11 | 11 | relative_paths = cpp_library.cpp_files.map { |f| f.split("SampleProjects/", 2)[1] }
|
12 |
| - expect(relative_paths).to match_array(testsomething_cpp_files) |
| 12 | + expect(relative_paths).to match_array(dosomething_cpp_files) |
13 | 13 | end
|
14 | 14 | end
|
15 | 15 |
|
16 | 16 | context "header_dirs" do
|
17 | 17 | it "finds directories containing h files" do
|
18 |
| - testsomething_header_dirs = ["TestSomething"] |
| 18 | + dosomething_header_dirs = ["DoSomething"] |
19 | 19 | relative_paths = cpp_library.header_dirs.map { |f| f.split("SampleProjects/", 2)[1] }
|
20 |
| - expect(relative_paths).to match_array(testsomething_header_dirs) |
| 20 | + expect(relative_paths).to match_array(dosomething_header_dirs) |
21 | 21 | end
|
22 | 22 | end
|
23 | 23 |
|
24 | 24 | context "tests_dir" do
|
25 | 25 | it "locate the tests directory" do
|
26 |
| - testsomething_header_dirs = ["TestSomething"] |
| 26 | + dosomething_header_dirs = ["DoSomething"] |
27 | 27 | relative_path = cpp_library.tests_dir.split("SampleProjects/", 2)[1]
|
28 |
| - expect(relative_path).to eq("TestSomething/test") |
| 28 | + expect(relative_path).to eq("DoSomething/test") |
29 | 29 | end
|
30 | 30 | end
|
31 | 31 |
|
32 | 32 | context "test_files" do
|
33 | 33 | it "finds cpp files in directory" do
|
34 |
| - testsomething_test_files = [ |
35 |
| - "TestSomething/test/good-null.cpp", |
36 |
| - "TestSomething/test/good-math.cpp", |
37 |
| - "TestSomething/test/good-trig.cpp", |
38 |
| - "TestSomething/test/good-library.cpp", |
39 |
| - "TestSomething/test/good-godmode.cpp", |
40 |
| - "TestSomething/test/good-defines.cpp", |
41 |
| - "TestSomething/test/good-wcharacter.cpp", |
42 |
| - "TestSomething/test/good-wstring.cpp", |
43 |
| - "TestSomething/test/good-stream.cpp", |
44 |
| - "TestSomething/test/good-serial.cpp", |
45 |
| - "TestSomething/test/bad-null.cpp", |
| 34 | + dosomething_test_files = [ |
| 35 | + "DoSomething/test/good-null.cpp", |
| 36 | + "DoSomething/test/good-library.cpp", |
| 37 | + "DoSomething/test/bad-null.cpp", |
46 | 38 | ]
|
47 | 39 | relative_paths = cpp_library.test_files.map { |f| f.split("SampleProjects/", 2)[1] }
|
48 |
| - expect(relative_paths).to match_array(testsomething_test_files) |
| 40 | + expect(relative_paths).to match_array(dosomething_test_files) |
49 | 41 | end
|
50 | 42 | end
|
51 | 43 |
|
|
0 commit comments