Sha256: f8a6ca022d59c4283166ffd7aab63be91a803db29c761b40b871921b3f69ab66
Contents?: true
Size: 1.08 KB
Versions: 8
Compression:
Stored size: 1.08 KB
Contents
require 'spec_helper' require 'blazing/recipes/bundler_recipe' describe Blazing::BundlerRecipe do before :each do @recipe_without_options = Blazing::BundlerRecipe.new('bundler') @recipe_with_options = Blazing::BundlerRecipe.new('bundler', :flags => '--without=production') @runner = double('runner', :run => nil) @recipe_with_options.instance_variable_set('@runner', @runner) @recipe_without_options.instance_variable_set('@runner', @runner) end describe '#run' do it 'fails if there is no gemfile' do File.stub!(:exists?).and_return(false) @recipe_without_options.run.should be false end it 'runs bundle install with default options when no options given' do File.stub!(:exists?).and_return(true) @runner.should_receive(:run).with('bundle install --deployment') @recipe_without_options.run end it 'runs bundle install with the options supplied' do File.stub!(:exists?).and_return(true) @runner.should_receive(:run).with('bundle install --without=production') @recipe_with_options.run end end end
Version data entries
8 entries across 8 versions & 1 rubygems