diff --git a/build_tests/configure/scope.rb b/build_tests/configure/scope.rb new file mode 100644 index 0000000..6f2d40f --- /dev/null +++ b/build_tests/configure/scope.rb @@ -0,0 +1 @@ +check_c_compiler "gcc" diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index 2187e74..60752e7 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -1481,4 +1481,14 @@ EOF expect(result.status).to_not eq 0 end end + + context "configure" do + it "raises a method not found error for configure methods called outside a configure block" do + test_dir "configure" + result = run_rscons(rsconsfile: "scope.rb") + expect(result.stderr).to match /NoMethodError/ + expect(result.status).to_not eq 0 + end + end + end