spec/cli/commander_spec.rb in cumuli-0.2.1 vs spec/cli/commander_spec.rb in cumuli-0.3.0
- old
+ new
@@ -1,11 +1,11 @@
require 'spec_helper'
describe Cumuli::CLI::Commander do
describe "#build" do
- let(:args) { mock({foreman_options: 'foreman-options-here'}) }
- let(:commander) { Cumuli::CLI::Commander.new(args) }
+ let(:command) { 'foreman start -p 3030' }
+ let(:commander) { Cumuli::CLI::Commander.new(command) }
context "application directory has no .rvmrc" do
before do
commander.stub(:rvmrc?).and_return(false)
end
@@ -24,11 +24,11 @@
it "has an rvm preface" do
commander.build.should include('rvm ruby-1.9.3 exec')
end
end
- it "ends with a call to foreman" do
- commander.build.should match(/foreman start foreman-options-here$/)
+ it "concludes with the command" do
+ commander.build.should match(/#{command}$/)
end
describe "reading from the file system" do
it "prefaces with the right rvm information" do
Dir.chdir(File.dirname(__FILE__) + "/../fixtures/app_set/loopy") do