Sha256: 0181a6de0c38f775668264e79e3fb26013902df22084da14590ddf9ca8db43f5
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
require 'spec_helper' describe Cumuli::Commander do describe "#build" do let(:args) { mock({foreman_options: 'foreman-options-here'}) } let(:commander) { Cumuli::Commander.new(args) } context "application directory has no .rvmrc" do before do commander.stub(:rvmrc?).and_return(false) end it "has not rvm preface" do commander.build.should_not include('rvm') end end context "application directory has an .rvmrc" do before do commander.stub(:rvm_version).and_return('1.9.3') commander.stub(:rvmrc?).and_return(true) end 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$/) 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 commander.build.should include('rvm ruby-2.0.0') end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cumuli-0.1.0 | spec/commander_spec.rb |