Sha256: 8d35a6ecaecee998550e77666eaf6b050a4a4fa8d8ba8b36723ed95ba7194c0d

Contents?: true

Size: 659 Bytes

Versions: 15

Compression:

Stored size: 659 Bytes

Contents

require File.dirname(__FILE__) + '/base'

describe Rush do
	it "fetches a local file path" do
		Rush['/etc/hosts'].full_path.should == '/etc/hosts'
	end

	it "fetches the dir of __FILE__" do
		Rush.dir(__FILE__).name.should == 'spec'
	end

	it "fetches the launch dir (aka current working directory or pwd)" do
		Dir.stub!(:pwd).and_return('/tmp')
		Rush.launch_dir.should == Rush::Box.new['/tmp/']
	end

	it "runs a bash command" do
		Rush.bash('echo hi').should == "hi\n"
	end

	it "gets the list of local processes" do
		Rush.processes.should be_kind_of(Rush::ProcessSet)
	end

	it "gets my process" do
		Rush.my_process.pid.should == Process.pid
	end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
adamwiggins-rush-0.6.1 spec/rush_spec.rb
adamwiggins-rush-0.6.2 spec/rush_spec.rb
rush-0.6.8 spec/rush_spec.rb
rush-0.6.7 spec/rush_spec.rb
aleksi-rush-0.6.7 spec/rush_spec.rb
aleksi-rush-0.6.6 spec/rush_spec.rb
rush-0.6.6 spec/rush_spec.rb
rush-0.6.5 spec/rush_spec.rb
rush-0.6.4 spec/rush_spec.rb
rush-0.6.3 spec/rush_spec.rb
rush-0.6.2 spec/rush_spec.rb
rush-0.6 spec/rush_spec.rb
rush-0.6.1 spec/rush_spec.rb
rush-0.5 spec/rush_spec.rb
rush-0.5.1 spec/rush_spec.rb