ceedling 0.15.5 → 0.15.6

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.
@@ -32,9 +32,9 @@ describe PreprocessinatorExtractor do
32
32
  'some_additional_awesome_want_text();',
33
33
  ]
34
34
 
35
- File.should_receive(:readlines).with(file_path).and_return( input_str )
35
+ expect(File).to receive(:readlines).with(file_path).and_return( input_str )
36
36
 
37
- subject.extract_base_file_from_preprocessed_expansion(file_path).should == expect_str
37
+ expect(subject.extract_base_file_from_preprocessed_expansion(file_path)).to eq expect_str
38
38
  end
39
39
 
40
40
  # These were originally hinted at by the old test, but we don't see anything
@@ -27,8 +27,8 @@ describe PreprocessinatorIncludesHandler do
27
27
  # create test state/variables
28
28
  # mocks/stubs/expected calls
29
29
  inc_list_double = double('inc-list-double')
30
- @file_path_utils.should_receive(:form_preprocessed_includes_list_filepath).with('some_source_file.c').and_return(inc_list_double)
31
- @task_invoker.should_receive(:invoke_test_shallow_include_lists).with( [inc_list_double] )
30
+ expect(@file_path_utils).to receive(:form_preprocessed_includes_list_filepath).with('some_source_file.c').and_return(inc_list_double)
31
+ expect(@task_invoker).to receive(:invoke_test_shallow_include_lists).with( [inc_list_double] )
32
32
  # execute method
33
33
  subject.invoke_shallow_includes_list('some_source_file.c')
34
34
  # validate results
@@ -39,23 +39,23 @@ describe PreprocessinatorIncludesHandler do
39
39
  it 'should return an annotated dependency rule generated by the preprocessor' do
40
40
  # create test state/variables
41
41
  # mocks/stubs/expected calls
42
- @file_path_utils.should_receive(:form_temp_path).with('some_source_file.c','_').and_return('_some_source_file.c')
42
+ expect(@file_path_utils).to receive(:form_temp_path).with('some_source_file.c','_').and_return('_some_source_file.c')
43
43
  contents_double = double('contents-double')
44
- @file_wrapper.should_receive(:read).with('some_source_file.c').and_return(contents_double)
45
- contents_double.should_receive(:gsub!).with(/^\s*#include\s+[\"<]\s*(\S+)\s*[\">]/, "#include \"\\1\"\n#include \"@@@@\\1\"")
46
- @file_wrapper.should_receive(:write).with('_some_source_file.c', contents_double)
47
- @configurator.should_receive(:tools_test_includes_preprocessor).and_return('cpp')
44
+ expect(@file_wrapper).to receive(:read).with('some_source_file.c').and_return(contents_double)
45
+ expect(contents_double).to receive(:gsub!).with(/^\s*#include\s+[\"<]\s*(\S+)\s*[\">]/, "#include \"\\1\"\n#include \"@@@@\\1\"")
46
+ expect(@file_wrapper).to receive(:write).with('_some_source_file.c', contents_double)
47
+ expect(@configurator).to receive(:tools_test_includes_preprocessor).and_return('cpp')
48
48
  command_double = double('command-double')
49
- @tool_executor.should_receive(:build_command_line).with('cpp', '_some_source_file.c').and_return(command_double)
50
- command_double.should_receive(:[]).with(:line).and_return('cpp')
51
- command_double.should_receive(:[]).with(:options).and_return(['arg1','arg2'])
49
+ expect(@tool_executor).to receive(:build_command_line).with('cpp', '_some_source_file.c').and_return(command_double)
50
+ expect(command_double).to receive(:[]).with(:line).and_return('cpp')
51
+ expect(command_double).to receive(:[]).with(:options).and_return(['arg1','arg2'])
52
52
  output_double = double('output-double')
53
- @tool_executor.should_receive(:exec).with('cpp',['arg1','arg2']).and_return(output_double)
54
- output_double.should_receive(:[]).with(:output).and_return('make-rule')
53
+ expect(@tool_executor).to receive(:exec).with('cpp',['arg1','arg2']).and_return(output_double)
54
+ expect(output_double).to receive(:[]).with(:output).and_return('make-rule')
55
55
  # execute method
56
56
  results = subject.form_shallow_dependencies_rule('some_source_file.c')
57
57
  # validate results
58
- results.should == 'make-rule'
58
+ expect(results).to eq 'make-rule'
59
59
  end
60
60
  end
61
61
 
@@ -63,7 +63,7 @@ describe PreprocessinatorIncludesHandler do
63
63
  it 'should return the list of direct dependencies for the given test file' do
64
64
  # create test state/variables
65
65
  # mocks/stubs/expected calls
66
- @configurator.should_receive(:extension_header).and_return('.h')
66
+ expect(@configurator).to receive(:extension_header).and_return('.h')
67
67
  # execute method
68
68
  results = subject.extract_shallow_includes(%q{
69
69
  _test_DUMMY.o: Build/temp/_test_DUMMY.c \
@@ -75,7 +75,7 @@ describe PreprocessinatorIncludesHandler do
75
75
  @@@@some_other_lib/some_header2.h
76
76
  })
77
77
  # validate results
78
- results.should == ['some_header1.h',
78
+ expect(results).to eq ['some_header1.h',
79
79
  'some_lib/some_header2.h',
80
80
  'some_other_lib/some_header2.h']
81
81
  end
@@ -83,7 +83,7 @@ describe PreprocessinatorIncludesHandler do
83
83
  it 'should return the list of direct dependencies for the given test file' do
84
84
  # create test state/variables
85
85
  # mocks/stubs/expected calls
86
- @configurator.should_receive(:extension_header).and_return('.h')
86
+ expect(@configurator).to receive(:extension_header).and_return('.h')
87
87
  # execute method
88
88
  results = subject.extract_shallow_includes(%q{
89
89
  _test_DUMMY.o: Build/temp/_test_DUMMY.c \
@@ -95,7 +95,7 @@ describe PreprocessinatorIncludesHandler do
95
95
  @@@@some_other_lib/some_header2.h
96
96
  })
97
97
  # validate results
98
- results.should == ['some_header1.h',
98
+ expect(results).to eq ['some_header1.h',
99
99
  'some_lib/some_header2.h',
100
100
  'some_other_lib/some_header2.h']
101
101
  end
@@ -103,7 +103,7 @@ describe PreprocessinatorIncludesHandler do
103
103
  it 'should correctly handle path separators' do
104
104
  # create test state/variables
105
105
  # mocks/stubs/expected calls
106
- @configurator.should_receive(:extension_header).and_return('.h')
106
+ expect(@configurator).to receive(:extension_header).and_return('.h')
107
107
  # execute method
108
108
  results = subject.extract_shallow_includes(%q{
109
109
  _test_DUMMY.o: Build/temp/_test_DUMMY.c \
@@ -117,7 +117,7 @@ describe PreprocessinatorIncludesHandler do
117
117
  @@@@some_other_lib/some_header2.h
118
118
  })
119
119
  # validate results
120
- results.should == ['some_header1.h',
120
+ expect(results).to eq ['some_header1.h',
121
121
  'some_lib/some_header2.h',
122
122
  'some_lib1/some_lib/some_header2.h',
123
123
  'some_other_lib/some_header2.h']
@@ -126,7 +126,7 @@ describe PreprocessinatorIncludesHandler do
126
126
  it 'exclude annotated headers with no matching "real" header' do
127
127
  # create test state/variables
128
128
  # mocks/stubs/expected calls
129
- @configurator.should_receive(:extension_header).and_return('.h')
129
+ expect(@configurator).to receive(:extension_header).and_return('.h')
130
130
  # execute method
131
131
  results = subject.extract_shallow_includes(%q{
132
132
  _test_DUMMY.o: Build/temp/_test_DUMMY.c \
@@ -135,13 +135,13 @@ describe PreprocessinatorIncludesHandler do
135
135
  @@@@some_lib/some_header2.h
136
136
  })
137
137
  # validate results
138
- results.should == ['some_header1.h']
138
+ expect(results).to eq ['some_header1.h']
139
139
  end
140
140
 
141
141
  it 'should correctly filter secondary dependencies' do
142
142
  # create test state/variables
143
143
  # mocks/stubs/expected calls
144
- @configurator.should_receive(:extension_header).and_return('.h')
144
+ expect(@configurator).to receive(:extension_header).and_return('.h')
145
145
  # execute method
146
146
  results = subject.extract_shallow_includes(%q{
147
147
  _test_DUMMY.o: Build/temp/_test_DUMMY.c \
@@ -156,7 +156,7 @@ describe PreprocessinatorIncludesHandler do
156
156
  @@@@some_other_lib/some_header2.h
157
157
  })
158
158
  # validate results
159
- results.should == ['some_header1.h',
159
+ expect(results).to eq ['some_header1.h',
160
160
  'some_lib/some_header2.h',
161
161
  'some_other_lib/some_header2.h']
162
162
  end
@@ -166,7 +166,7 @@ describe PreprocessinatorIncludesHandler do
166
166
  it 'should invoke the rake task which will build included files' do
167
167
  # create test state/variables
168
168
  # mocks/stubs/expected calls
169
- @yaml_wrapper.should_receive(:dump).with('some_source_file.c', [])
169
+ expect(@yaml_wrapper).to receive(:dump).with('some_source_file.c', [])
170
170
  # execute method
171
171
  subject.write_shallow_includes_list('some_source_file.c', [])
172
172
  # validate results
data/spec/spec_helper.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  require 'require_all'
2
2
  require 'constructor'
3
3
 
4
- #RSpec.configure do |configuration|
5
- # configuration.mock_with :rr
6
- #end
4
+ RSpec.configure do |config|
5
+ config.raise_errors_for_deprecations!
6
+ end
7
7
 
8
8
  here = File.dirname(__FILE__)
9
9
 
@@ -57,7 +57,7 @@ class SystemContext
57
57
  Dir.chdir @dir do
58
58
  with_constrained_env do
59
59
  `bundle install --path #{@gem.install_dir}`
60
- checks = [ "bundle exec ruby -S ceedling 2>&1"]
60
+ checks = ["bundle exec ruby -S ceedling 2>&1"]
61
61
  checks.each do |c|
62
62
  `#{c}`
63
63
  raise VerificationFailed.new(c) unless $?.success?
@@ -124,10 +124,10 @@ module CeedlingTestCases
124
124
  def can_create_projects
125
125
  @c.with_context do
126
126
  Dir.chdir @proj_name do
127
- File.exists?("project.yml").should be_true
128
- File.exists?("rakefile.rb").should be_true
129
- File.exists?("src").should be_true
130
- File.exists?("test").should be_true
127
+ expect(File.exists?("project.yml")).to eq true
128
+ expect(File.exists?("rakefile.rb")).to eq true
129
+ expect(File.exists?("src")).to eq true
130
+ expect(File.exists?("test")).to eq true
131
131
  end
132
132
  end
133
133
  end
@@ -135,7 +135,7 @@ module CeedlingTestCases
135
135
  def contains_a_vendor_directory
136
136
  @c.with_context do
137
137
  Dir.chdir @proj_name do
138
- File.exists?("vendor/ceedling").should be_true
138
+ expect(File.exists?("vendor/ceedling")).to eq true
139
139
  end
140
140
  end
141
141
  end
@@ -143,7 +143,7 @@ module CeedlingTestCases
143
143
  def does_not_contain_a_vendor_directory
144
144
  @c.with_context do
145
145
  Dir.chdir @proj_name do
146
- File.exists?("vendor/ceedling").should be_false
146
+ expect(File.exists?("vendor/ceedling")).to eq false
147
147
  end
148
148
  end
149
149
  end
@@ -151,7 +151,7 @@ module CeedlingTestCases
151
151
  def contains_documentation
152
152
  @c.with_context do
153
153
  Dir.chdir @proj_name do
154
- Dir["vendor/ceedling/docs/*.pdf"].length.should == 4
154
+ expect(Dir["vendor/ceedling/docs/*.pdf"].length).to eq 4
155
155
  end
156
156
  end
157
157
  end
@@ -159,8 +159,8 @@ module CeedlingTestCases
159
159
  def does_not_contain_documentation
160
160
  @c.with_context do
161
161
  Dir.chdir @proj_name do
162
- File.exists?("vendor/ceedling/docs").should be_false
163
- Dir["vendor/ceedling/**/*.pdf"].length.should == 0
162
+ expect(File.exists?("vendor/ceedling/docs")).to eq false
163
+ expect(Dir["vendor/ceedling/**/*.pdf"].length).to eq 0
164
164
  end
165
165
  end
166
166
  end
@@ -173,9 +173,9 @@ module CeedlingTestCases
173
173
  FileUtils.cp test_asset_path("test_example_file.c"), 'test'
174
174
 
175
175
  output = `bundle exec ruby -S rake test:all 2>&1`
176
- output.should match(/TESTED:\s+2/)
177
- output.should match(/PASSED:\s+1/)
178
- output.should match(/IGNORED:\s+0/)
176
+ expect(output).to match(/TESTED:\s+2/)
177
+ expect(output).to match(/PASSED:\s+1/)
178
+ expect(output).to match(/IGNORED:\s+0/)
179
179
  end
180
180
  end
181
181
  end
@@ -185,7 +185,7 @@ module CeedlingTestCases
185
185
  Dir.chdir @proj_name do
186
186
  `bundle exec ruby -S rake module:create[ponies] 2>&1`
187
187
  output = `bundle exec ruby -S rake test:all 2>&1`
188
- output.should match(/IGNORED:\s+1/)
188
+ expect(output).to match(/IGNORED:\s+1/)
189
189
  end
190
190
  end
191
191
  end
@@ -64,9 +64,9 @@ describe "Ceedling" do
64
64
  end
65
65
 
66
66
  it "should list out all the examples" do
67
- @output.should match(/blinky/)
68
- @output.should match(/temp_sensor/)
69
- @output.lines.to_a.length.should == 3
67
+ expect(@output).to match(/blinky/)
68
+ expect(@output).to match(/temp_sensor/)
69
+ expect(@output.lines.to_a.length).to eq 3
70
70
  end
71
71
  end
72
72
 
@@ -75,7 +75,7 @@ describe "Ceedling" do
75
75
  before do
76
76
  @c.with_context do
77
77
  output = `bundle exec ruby -S ceedling example temp_sensor 2>&1`
78
- output.should match(/created!/)
78
+ expect(output).to match(/created!/)
79
79
  end
80
80
  end
81
81
 
@@ -83,8 +83,8 @@ describe "Ceedling" do
83
83
  @c.with_context do
84
84
  Dir.chdir "temp_sensor" do
85
85
  @output = `bundle exec ruby -S rake test:all`
86
- @output.should match(/TESTED:\s+47/)
87
- @output.should match(/PASSED:\s+47/)
86
+ expect(@output).to match(/TESTED:\s+47/)
87
+ expect(@output).to match(/PASSED:\s+47/)
88
88
  end
89
89
  end
90
90
  end
@@ -98,7 +98,7 @@ describe "Ceedling" do
98
98
  # before do
99
99
  # @c.with_context do
100
100
  # output = `bundle exec ruby -S ceedling example blinky 2>&1`
101
- # output.should match(/created!/)
101
+ # expect(output).to match(/created!/)
102
102
  # end
103
103
  # end
104
104
  #
@@ -106,8 +106,8 @@ describe "Ceedling" do
106
106
  # @c.with_context do
107
107
  # Dir.chdir "blinky" do
108
108
  # @output = `bundle exec ruby -S rake test:all`
109
- # @output.should match(/TESTED:\s+7/)
110
- # @output.should match(/PASSED:\s+7/)
109
+ # expect(@output).to match(/TESTED:\s+7/)
110
+ # expect(@output).to match(/PASSED:\s+7/)
111
111
  # end
112
112
  # end
113
113
  # end
@@ -19,13 +19,13 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
19
19
 
20
20
  should "insert tool names into tools config from their config hash key names" do
21
21
  in_hash = {
22
- :tools => {
22
+ :tools => {
23
23
  :thinger => {:executable => '/bin/thinger', :arguments => ['-E']},
24
24
  :zinger => {:executable => 'zinger', :arguments => ['-option', '-flag']}
25
25
  }}
26
-
26
+
27
27
  @builder.populate_tool_names(in_hash)
28
-
28
+
29
29
  assert_equal('thinger', in_hash[:tools][:thinger][:name])
30
30
  assert_equal('/bin/thinger', in_hash[:tools][:thinger][:executable])
31
31
  assert_equal(['-E'], in_hash[:tools][:thinger][:arguments])
@@ -33,13 +33,13 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
33
33
  assert_equal('zinger', in_hash[:tools][:zinger][:name])
34
34
  assert_equal('zinger', in_hash[:tools][:zinger][:executable])
35
35
  assert_equal(['-option', '-flag'], in_hash[:tools][:zinger][:arguments])
36
-
36
+
37
37
  end
38
38
 
39
39
  ############# flattenify #############
40
-
40
+
41
41
  should "flattenify keys and values contained in yaml and not blow up on empty top-level entries" do
42
-
42
+
43
43
  config = %Q{
44
44
  ---
45
45
  :project:
@@ -65,23 +65,23 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
65
65
  ...
66
66
  }.left_margin
67
67
  hash = @builder.flattenify( YAML.load(config) )
68
-
68
+
69
69
  assert_equal(hash[:project_name], 'App')
70
70
  assert_equal(hash[:project_dirs], ['.', 'gui', '../common/modules/'])
71
-
71
+
72
72
  assert_equal(hash[:extension_obj], '.o')
73
73
  assert_equal(hash[:extension_bin], '.out')
74
74
  assert_equal(hash[:extension_dep], '.d')
75
-
75
+
76
76
  assert_equal(hash[:cmock_mock_path], 'build/tests/mocks/')
77
- assert_equal(hash[:cmock_plugins], ['cexception', 'ignore'])
77
+ assert_equal(hash[:cmock_plugins], ['cexception', 'ignore'])
78
78
  end
79
79
 
80
80
  ############# defaults #############
81
81
 
82
82
  should "populate all defaults for unspecified entries in config hash" do
83
83
  # pass in blank configuration and ensure all defaults populated
84
- assert_equal(DEFAULT_CEEDLING_CONFIG, @builder.populate_defaults({}))
84
+ assert_equal(DEFAULT_CEEDLING_CONFIG, @builder.populate_defaults({}))
85
85
  end
86
86
 
87
87
  should "not default any entry in input config hash that's already been set to something" do
@@ -96,7 +96,7 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
96
96
 
97
97
  :paths_support => ['path/support'],
98
98
  :paths_include => ['path/include'],
99
-
99
+
100
100
  :defines_test => ['TEST_DEFINE'],
101
101
  :defines_source => ['SOURCE_DEFINE'],
102
102
 
@@ -107,46 +107,46 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
107
107
  :extension_testpass => '.p',
108
108
  :extension_testfail => '.f',
109
109
  :extension_dependencies => '.dep',
110
-
110
+
111
111
  :unity_int_width => 16,
112
112
  :unity_exclude_float => true,
113
- :unity_float_type => 'double',
113
+ :unity_float_type => 'double',
114
114
  :unity_float_precision => '0.0000001f',
115
-
115
+
116
116
  :test_runner_includes => ['Common.h'],
117
117
  :test_runner_file_suffix => '_walker',
118
-
118
+
119
119
  :tools_includes_preprocessor => {:name => 'doohicky', :executable => 'exe', :arguments => []},
120
120
  :tools_file_preprocessor => {:name => 'doohicky', :executable => 'exe', :arguments => []},
121
121
  :tools_dependencies_generator => {:name => 'doohicky', :executable => 'exe', :arguments => []},
122
122
  }
123
-
123
+
124
124
  assert_equal(in_hash, @builder.populate_defaults(in_hash))
125
125
  end
126
126
 
127
127
  should "merge complex/nested values within default values" do
128
- in_hash = {
128
+ in_hash = {
129
129
  :tools_file_preprocessor => {:executable => '/bin/app'},
130
130
  :tools_dependencies_generator => {:arguments => ['-option', '-flag']}
131
131
  }
132
-
132
+
133
133
  out_hash = @builder.populate_defaults(in_hash)
134
-
134
+
135
135
  # default executable has been overwritten but default arguments remain
136
136
  assert_equal('/bin/app', out_hash[:tools_file_preprocessor][:executable])
137
137
  assert_equal(DEFAULT_FILE_PREPROCESSOR_TOOL[:arguments], out_hash[:tools_file_preprocessor][:arguments])
138
-
138
+
139
139
  # default arguments have been overwritten but default executable remains
140
140
  assert_equal(DEFAULT_DEPENDENCIES_GENERATOR_TOOL[:executable], out_hash[:tools_dependencies_generator][:executable])
141
- assert_equal(['-option', '-flag'], out_hash[:tools_dependencies_generator][:arguments])
141
+ assert_equal(['-option', '-flag'], out_hash[:tools_dependencies_generator][:arguments])
142
142
  end
143
143
 
144
144
  should "preserve in defaulted configuration anything in input that's not a handled default" do
145
- in_hash = {
145
+ in_hash = {
146
146
  :yo => 'mama',
147
147
  :be => 'all you can be'
148
148
  }
149
-
149
+
150
150
  assert_equal(DEFAULT_CEEDLING_CONFIG.merge(in_hash), @builder.populate_defaults(in_hash))
151
151
  end
152
152
 
@@ -179,7 +179,7 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
179
179
  out_hash = @builder.set_build_paths(in_hash)
180
180
 
181
181
  assert_equal(expected_build_paths.sort, out_hash[:project_build_paths].sort)
182
-
182
+
183
183
  assert_equal(expected_build_paths[0], out_hash[:project_test_runners_path])
184
184
  assert_equal(expected_build_paths[1], out_hash[:project_test_results_path])
185
185
  assert_equal(expected_build_paths[2], out_hash[:project_test_build_output_path])
@@ -201,9 +201,9 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
201
201
  'files/build/tests/artifacts',
202
202
  'files/build/release/out',
203
203
  'files/build/release/artifacts',]
204
-
204
+
205
205
  out_hash = @builder.set_build_paths(in_hash)
206
-
206
+
207
207
  assert_equal(expected_build_paths.sort, out_hash[:project_build_paths].sort)
208
208
 
209
209
  assert_equal(expected_build_paths[0], out_hash[:project_test_runners_path])
@@ -228,9 +228,9 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
228
228
  'files/build/tests/artifacts',
229
229
  'files/build/release/out',
230
230
  'files/build/release/artifacts',]
231
-
231
+
232
232
  out_hash = @builder.set_build_paths(in_hash)
233
-
233
+
234
234
  assert_equal(expected_build_paths.sort, out_hash[:project_build_paths].sort)
235
235
 
236
236
  assert_equal(expected_build_paths[0], out_hash[:project_test_runners_path])
@@ -256,9 +256,9 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
256
256
  'files/build/tests/artifacts',
257
257
  'files/build/release/out',
258
258
  'files/build/release/artifacts',]
259
-
259
+
260
260
  out_hash = @builder.set_build_paths(in_hash)
261
-
261
+
262
262
  assert_equal(expected_build_paths.sort, out_hash[:project_build_paths].sort)
263
263
 
264
264
  assert_equal(expected_build_paths[0], out_hash[:project_test_runners_path])
@@ -280,7 +280,7 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
280
280
  "#{CEEDLING_LIB}tasks.rake",
281
281
  "#{CEEDLING_LIB}tasks_filesystem.rake"].sort,
282
282
  out_hash[:project_rakefile_component_files].sort)
283
-
283
+
284
284
  in_hash = {:project_use_mocks => true}
285
285
  out_hash = @builder.set_rakefile_components(in_hash)
286
286
  assert_equal(
@@ -298,7 +298,7 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
298
298
  "#{CEEDLING_LIB}rules_preprocess.rake",
299
299
  "#{CEEDLING_LIB}tasks_filesystem.rake"].sort,
300
300
  out_hash[:project_rakefile_component_files].sort)
301
-
301
+
302
302
  in_hash = {:project_use_deep_dependencies => true}
303
303
  out_hash = @builder.set_rakefile_components(in_hash)
304
304
  assert_equal(
@@ -325,13 +325,13 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
325
325
  should "collect all source and test include paths without optional mocks and exception paths" do
326
326
  in_hash = {
327
327
  :project_use_exceptions => false,
328
- :project_use_mocks => false,
328
+ :project_use_mocks => false,
329
329
  :paths_test => ['files/tests'],
330
330
  :paths_support => ['files/tests/support'],
331
331
  :paths_source => ['files/source'],
332
332
  :paths_include => ['files/source/include'],
333
333
  }
334
-
334
+
335
335
  expected_include_paths = ['files/source', 'files/source/include', 'files/tests', 'files/tests/support', "#{CEEDLING_VENDOR}unity/src"]
336
336
 
337
337
  out_hash = @builder.collect_test_and_source_include_paths(in_hash)
@@ -342,13 +342,13 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
342
342
  should "collect all source and test include paths without optional mocks paths but with exception path" do
343
343
  in_hash = {
344
344
  :project_use_exceptions => true,
345
- :project_use_mocks => false,
345
+ :project_use_mocks => false,
346
346
  :paths_test => ['files/tests'],
347
347
  :paths_support => ['files/tests/support'],
348
348
  :paths_source => ['files/source'],
349
349
  :paths_include => ['files/source/include'],
350
350
  }
351
-
351
+
352
352
  expected_include_paths = ['files/source', 'files/source/include', 'files/tests', 'files/tests/support', "#{CEEDLING_VENDOR}unity/src", "#{CEEDLING_VENDOR}c_exception/lib"]
353
353
 
354
354
  out_hash = @builder.collect_test_and_source_include_paths(in_hash)
@@ -366,7 +366,7 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
366
366
  :paths_source => ['files/source'],
367
367
  :paths_include => ['files/source/include'],
368
368
  }
369
-
369
+
370
370
  expected_include_paths = ['files/source', 'files/source/include', 'files/tests', 'files/tests/support', "#{CEEDLING_VENDOR}unity/src", 'files/build/mocks']
371
371
 
372
372
  out_hash = @builder.collect_test_and_source_include_paths(in_hash)
@@ -384,7 +384,7 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
384
384
  :paths_source => ['files/source'],
385
385
  :paths_include => ['files/source/include'],
386
386
  }
387
-
387
+
388
388
  expected_include_paths = ['files/source', 'files/source/include', 'files/tests', 'files/tests/support', "#{CEEDLING_VENDOR}unity/src", "#{CEEDLING_VENDOR}c_exception/lib", 'files/build/mocks']
389
389
 
390
390
  out_hash = @builder.collect_test_and_source_include_paths(in_hash)
@@ -397,13 +397,13 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
397
397
  should "collect all source and test paths without optional mocks and exception paths" do
398
398
  in_hash = {
399
399
  :project_use_exceptions => false,
400
- :project_use_mocks => false,
400
+ :project_use_mocks => false,
401
401
  :paths_test => ['files/tests'],
402
402
  :paths_support => ['files/tests/support'],
403
403
  :paths_source => ['files/source'],
404
404
  :project_test_runners_path => 'files/build/runners',
405
405
  }
406
-
406
+
407
407
  expected_paths = ['files/tests', 'files/tests/support', 'files/source', 'files/build/runners', "#{CEEDLING_VENDOR}unity/src"]
408
408
 
409
409
  out_hash = @builder.collect_test_and_source_paths(in_hash)
@@ -414,14 +414,14 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
414
414
  should "collect all source and test paths with optional mocks path but without exception path" do
415
415
  in_hash = {
416
416
  :project_use_exceptions => false,
417
- :project_use_mocks => true,
417
+ :project_use_mocks => true,
418
418
  :paths_test => ['files/tests'],
419
419
  :paths_support => ['files/tests/support'],
420
420
  :paths_source => ['files/source'],
421
421
  :project_test_runners_path => 'files/build/runners',
422
422
  :cmock_mock_path => 'files/build/mocks',
423
423
  }
424
-
424
+
425
425
  expected_paths = ['files/tests', 'files/tests/support', 'files/source', 'files/build/runners', 'files/build/mocks', "#{CEEDLING_VENDOR}unity/src"]
426
426
 
427
427
  out_hash = @builder.collect_test_and_source_paths(in_hash)
@@ -438,7 +438,7 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
438
438
  :paths_source => ['files/source'],
439
439
  :project_test_runners_path => 'files/build/runners',
440
440
  }
441
-
441
+
442
442
  expected_paths = ['files/tests', 'files/tests/support', 'files/source', 'files/build/runners', "#{CEEDLING_VENDOR}c_exception/lib", "#{CEEDLING_VENDOR}unity/src"]
443
443
 
444
444
  out_hash = @builder.collect_test_and_source_paths(in_hash)
@@ -456,27 +456,27 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
456
456
  :project_test_runners_path => 'files/build/runners',
457
457
  :cmock_mock_path => 'files/build/mocks',
458
458
  }
459
-
459
+
460
460
  expected_paths = ['files/tests', 'files/tests/support', 'files/source', 'files/build/runners', 'files/build/mocks', "#{CEEDLING_VENDOR}c_exception/lib", "#{CEEDLING_VENDOR}unity/src"]
461
461
 
462
462
  out_hash = @builder.collect_test_and_source_paths(in_hash)
463
463
 
464
464
  assert_equal(expected_paths.sort, out_hash[:paths_test_and_source].sort)
465
465
  end
466
-
466
+
467
467
  ############# all tests #############
468
-
468
+
469
469
  should "collect all tests" do
470
470
  in_hash = {
471
471
  :paths_test => ['tests/main', 'tests/other/**'],
472
472
  :project_test_file_prefix => 'Test',
473
473
  :extension_source => '.c'}
474
-
474
+
475
475
  @file_wrapper.expects.instantiate_file_list.returns(@file_list)
476
-
476
+
477
477
  @file_list.expects.include('tests/main/Test*.c')
478
478
  @file_list.expects.include('tests/other/**/Test*.c')
479
-
479
+
480
480
  assert_equal({:collection_all_tests => @file_list}, @builder.collect_tests(in_hash))
481
481
  end
482
482
 
@@ -486,12 +486,12 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
486
486
  in_hash = {
487
487
  :paths_source => ['files/source', 'files/modules/**'],
488
488
  :extension_source => '.c'}
489
-
489
+
490
490
  @file_wrapper.expects.instantiate_file_list.returns(@file_list)
491
-
491
+
492
492
  @file_list.expects.include('files/source/*.c')
493
493
  @file_list.expects.include('files/modules/**/*.c')
494
-
494
+
495
495
  assert_equal({:collection_all_source => @file_list}, @builder.collect_source(in_hash))
496
496
  end
497
497
 
@@ -503,14 +503,14 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
503
503
  :paths_include => ['files/source/include'],
504
504
  :paths_source => ['files/source', 'files/modules/**'],
505
505
  :extension_header => '.h'}
506
-
506
+
507
507
  @file_wrapper.expects.instantiate_file_list.returns(@file_list)
508
-
508
+
509
509
  @file_list.expects.include('files/test/support/**/*.h')
510
510
  @file_list.expects.include('files/source/*.h')
511
511
  @file_list.expects.include('files/modules/**/*.h')
512
512
  @file_list.expects.include('files/source/include/*.h')
513
-
513
+
514
514
  assert_equal({:collection_all_headers => @file_list}, @builder.collect_headers(in_hash))
515
515
  end
516
516
 
@@ -519,25 +519,23 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
519
519
  should "collect environment source files plus project file but no user project file" do
520
520
  @project_config_manager.expects.main_project_filepath.returns('/home/project/config/project.yaml')
521
521
  @project_config_manager.expects.user_project_filepath.returns('')
522
-
522
+
523
523
  out_hash = @builder.collect_code_generation_dependencies
524
-
524
+
525
525
  assert_equal(
526
- ["#{CEEDLING_RELEASE}build.info",
527
- "#{CEEDLING_VENDOR}cmock/release/build.info",
526
+ ["#{CEEDLING_VENDOR}cmock/release/build.info",
528
527
  '/home/project/config/project.yaml'].sort,
529
528
  out_hash[:collection_code_generation_dependencies].sort)
530
529
  end
531
530
 
532
- should "collect environment source files plus project file and user project file" do
531
+ should "collect environment source files plus project file and user project file" do
533
532
  @project_config_manager.expects.main_project_filepath.returns('/home/project/config/project.yaml')
534
533
  @project_config_manager.expects.user_project_filepath.returns('/home/project/config/user.yaml')
535
-
534
+
536
535
  out_hash = @builder.collect_code_generation_dependencies
537
-
536
+
538
537
  assert_equal(
539
- ["#{CEEDLING_RELEASE}build.info",
540
- "#{CEEDLING_VENDOR}cmock/release/build.info",
538
+ ["#{CEEDLING_VENDOR}cmock/release/build.info",
541
539
  '/home/project/config/project.yaml',
542
540
  '/home/project/config/user.yaml'].sort,
543
541
  out_hash[:collection_code_generation_dependencies].sort)
@@ -546,7 +544,7 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
546
544
  ############# expand path globs #############
547
545
 
548
546
  should "inspect each element of paths in config hash and expand any and all globs into a collection" do
549
-
547
+
550
548
  create_mocks(:paths_collection1, :paths_collection2, :paths_collection3)
551
549
  in_hash = {
552
550
  :path_dummy => [],
@@ -555,17 +553,17 @@ class ConfiguratorBuilderTest < Test::Unit::TestCase
555
553
  :paths_to_destruction => ['paths/sin', 'paths/avarice'],
556
554
  :whatever => 'blah blah blah',
557
555
  }
558
-
556
+
559
557
  @file_system_utils.expects.collect_paths(['oh', 'yeah']).returns(@paths_collection1)
560
558
  @file_system_utils.expects.collect_paths(['files/source', 'files/modules/**']).returns(@paths_collection2)
561
559
  @file_system_utils.expects.collect_paths(['paths/sin', 'paths/avarice']).returns(@paths_collection3)
562
-
560
+
563
561
  out_hash = @builder.expand_all_path_globs(in_hash)
564
562
 
565
563
  assert_equal(@paths_collection1, out_hash[:collection_paths_custom])
566
564
  assert_equal(@paths_collection2, out_hash[:collection_paths_source])
567
- assert_equal(@paths_collection3, out_hash[:collection_paths_to_destruction])
565
+ assert_equal(@paths_collection3, out_hash[:collection_paths_to_destruction])
568
566
  end
569
-
567
+
570
568
  end
571
569