Skip to content

Commit

Permalink
Fix compile errors reporting in rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfixes committed Apr 5, 2021
1 parent 413fc62 commit 22e514d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- A missing `examples` directory no longer causes a crash in `cpp_library.rb`
- Referring to an undefined platform no longer causes a crash; it's now a helpful error message
- A copy/paste error that prevented compiler warning flags from being supplied has been fixed, via jgfoster
- RSpec was not communicating compile errors from unit test executables that failed to build. Now it does, via jgfoster

### Security

Expand Down
7 changes: 2 additions & 5 deletions spec/testsomething_unittests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
context "file #{tfn} (using #{compiler})" do
around(:example) { |example| fld.in_pristine_fake_libraries_dir(example) }

before(:all) do
before(:each) do
@cpp_library = backend.install_local_library(cpp_lib_path)
@exe = @cpp_library.build_for_test_with_configuration(path, [], compiler, config.gcc_config("uno"))
end
Expand All @@ -88,11 +88,8 @@
end
end

it "#{tfn} builds successfully" do
it "#{tfn} builds successfully and passes tests" do
expect(@exe).not_to be nil
end
it "#{tfn} passes tests" do
skip "Can't run the test program because it failed to build" if @exe.nil?
expect(@cpp_library.run_test_file(@exe)).to_not be_falsey
end
end
Expand Down

0 comments on commit 22e514d

Please sign in to comment.