Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed Jun 22, 2013
1 parent b3ef9fc commit 4151e97
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/magi/command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
end

describe "#call" do
let(:env) do
{ "WORKSPACE_PATH" => Dir.pwd }
end

context "with `setup`" do
let(:arguments) do
["setup"]
end

it "executes setup script" do
command.should_receive(:system).with("cd #{Dir.pwd} && rake db:create db:migrate")
command.should_receive(:system).with(env, "cd #{Dir.pwd} && bundle install && bundle exec rake db:create db:migrate")
command.call
end
end
Expand All @@ -30,7 +34,7 @@
end

it "executes start script" do
command.should_receive(:system).with({ "WORKSPACE_PATH" => Dir.pwd }, "cd #{Dir.pwd} && foreman start")
command.should_receive(:system).with(env, "cd #{Dir.pwd} && bundle exec foreman start")
command.call
end
end
Expand Down

0 comments on commit 4151e97

Please sign in to comment.