Sha256: 6befb59d2731eea59906863ab5278c733cecee485307e029d35e93513594a514
Contents?: true
Size: 1.18 KB
Versions: 23
Compression:
Stored size: 1.18 KB
Contents
require File.join(File.dirname(__FILE__),'spec_helper') describe "Node" do include Rhoconnect include TestHelpers before(:each) do Store.create Store.flush_all Rhoconnect.use_node = true end after(:each) do Rhoconnect::Node.kill_process end it "should start node" do Rhoconnect.bootstrap(get_testapp_path) Rhoconnect::Node.started.should == true end it "should stop node" do Rhoconnect.bootstrap(get_testapp_path) Rhoconnect::Node.started.should == true Rhoconnect::Node.kill_process Rhoconnect::Node.started.should == false end it "should print message if `package.json` not detected" do File.stub(:exists?).and_return(false) Rhoconnect::Node.should_receive(:log).once.with("No `package.json` detected, disabling JavaScript support.") Rhoconnect.bootstrap(get_testapp_path) Rhoconnect::Node.started.should == false end it "should print message if node not detected" do File.stub(:executable?).and_return(false) Rhoconnect::Node.should_receive(:log).once.with("Node.js not detected, disabling JavaScript support.") Rhoconnect.bootstrap(get_testapp_path) Rhoconnect::Node.started.should == false end end
Version data entries
23 entries across 23 versions & 1 rubygems