This repository was archived by the owner on Dec 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 before do
55 @context = double ( :CompilationContext )
66 end
7+
78 describe "the system location" do
89 before do
910 @location = Libv8 ::Location ::System . new
1011 @context . stub ( :dir_config )
1112 end
13+
1214 describe "configuring a compliation context with it" do
1315 before do
1416 @context . stub ( :find_header ) { true }
1517 @context . stub ( :have_library ) { true }
1618 @location . configure @context
1719 end
20+
1821 it "adds the include path to the front of the include flags" do
1922 @context . should have_received ( :dir_config ) . with ( 'v8' ) . at_least ( :once )
2023 @context . should have_received ( :find_header ) . with ( 'v8.h' ) . at_least ( :once )
2124 @context . should have_received ( :have_library ) . with ( 'v8' ) . at_least ( :once )
2225 end
2326 end
27+
2428 describe "when the v8 library cannot be found" do
2529 before do
2630 @context . stub ( :find_header ) { true }
2731 @context . stub ( :have_library ) { false }
2832 end
33+
2934 it "raises a NotFoundError" do
3035 expect { @location . configure @context } . to raise_error Libv8 ::Location ::System ::NotFoundError
3136 end
3237 end
38+
3339 describe "when the v8.h header cannot be found" do
3440 before do
3541 @context . stub ( :find_header ) { false }
3642 @context . stub ( :have_library ) { true }
3743 end
44+
3845 it "raises a NotFoundError" do
3946 expect { @location . configure @context } . to raise_error Libv8 ::Location ::System ::NotFoundError
4047 end
You can’t perform that action at this time.
0 commit comments