raise error if user constructs an Environment before configuration is complete

This commit is contained in:
josh committed 2019-04-14 20:45:31 -04:00
1 parent 3115e55739
commit 787b3249a7
4 files changed
+10 -7

No files matched your search

+3 -3
View File
@@ -2012,10 +2012,10 @@ EOF
expect(result.status).to_not eq 0
end
it "exits with an error if configuration has not been performed before attempting to process an environment" do
it "exits with an error if configuration has not been performed before attempting to create an environment" do
test_dir "configure"
result = run_rscons(rsconscript: "error_env_process_before_configure.rb")
expect(result.stderr).to match /Project must be configured before processing an Environment/
result = run_rscons(rsconscript: "error_env_construction_before_configure.rb")
expect(result.stderr).to match /Project must be configured before creating an Environment/
expect(result.status).to_not eq 0
end
+4
View File
@@ -1,5 +1,9 @@
module Rscons
describe Environment do
before(:each) do
Cache.instance["configuration_data"] = {"configured" => true}
end
describe "#initialize" do
it "adds the default builders when they are not excluded" do
env = Environment.new