spec/lib/node_spec.rb in hieracles-0.1.7 vs spec/lib/node_spec.rb in hieracles-0.2.0

- old
+ new

@@ -153,23 +153,23 @@ describe '.modules' do context "no unfound modules" do let(:expected) { { - "fake_module" => "modules/fake_module", - "fake_module2" => "modules/fake_module2", - "fake_module3" => "modules/fake_module3" + "fake_module" => File.expand_path("spec/files/modules/fake_module"), + "fake_module2" => File.expand_path("spec/files/modules/fake_module2"), + "fake_module3" => File.expand_path("spec/files/modules/fake_module3") } } it { expect(node.modules).to eq expected } end context "one unfound modules" do let(:node) { Hieracles::Node.new 'server2.example.com', options } let(:expected) { { - "fake_module" => "modules/fake_module", - "fake_module2" => "modules/fake_module2", + "fake_module" => File.expand_path("spec/files/modules/fake_module"), + "fake_module2" => File.expand_path("spec/files/modules/fake_module2"), "fake_module4" => nil } } it { expect(node.modules).to eq expected } end @@ -179,14 +179,14 @@ end context "multiple classes included" do let(:node) { Hieracles::Node.new 'server4.example.com', options } let(:expected) { { - "fake_module" => "modules/fake_module", - "fake_module2" => "modules/fake_module2", + "fake_module" => File.expand_path("spec/files/modules/fake_module"), + "fake_module2" => File.expand_path("spec/files/modules/fake_module2"), "fake_module4" => nil, - "faux_module1" => "modules/faux_module1", - "faux_module2" => "modules/faux_module2" + "faux_module1" => File.expand_path("spec/files/modules/faux_module1"), + "faux_module2" => File.expand_path("spec/files/modules/faux_module2") } } it { expect(node.modules).to eq expected } end end