Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 29 lines (22 sloc) 0.659 kB
f708773 @adamwiggins convenience methods for local access on top-level module
authored
1 require File.dirname(__FILE__) + '/base'
2
3 describe Rush do
2226d4e @adamwiggins spec for Rush[]
authored
4 it "fetches a local file path" do
5 Rush['/etc/hosts'].full_path.should == '/etc/hosts'
6 end
7
f708773 @adamwiggins convenience methods for local access on top-level module
authored
8 it "fetches the dir of __FILE__" do
9 Rush.dir(__FILE__).name.should == 'spec'
10 end
11
12 it "fetches the launch dir (aka current working directory or pwd)" do
13 Dir.stub!(:pwd).and_return('/tmp')
14 Rush.launch_dir.should == Rush::Box.new['/tmp/']
15 end
16
17 it "runs a bash command" do
18 Rush.bash('echo hi').should == "hi\n"
19 end
20
21 it "gets the list of local processes" do
22 Rush.processes.should be_kind_of(Rush::ProcessSet)
23 end
24
25 it "gets my process" do
26 Rush.my_process.pid.should == Process.pid
27 end
28 end
Something went wrong with that request. Please try again.