spec/nanoc/cli/commands/shell_spec.rb in nanoc-4.7.9 vs spec/nanoc/cli/commands/shell_spec.rb in nanoc-4.7.10

- old
+ new

@@ -1,12 +1,20 @@ +# frozen_string_literal: true + describe Nanoc::CLI::Commands::Shell, site: true, stdio: true do describe '#run' do before do # Prevent double-loading expect(Nanoc::CLI).to receive(:setup) end it 'can be invoked' do + rules_collection = Nanoc::RuleDSL::RulesCollection.new + config = Nanoc::Int::Configuration.new.with_defaults + + dsl = Nanoc::RuleDSL::CompilerDSL.new(rules_collection, config) + allow(Nanoc::RuleDSL::CompilerDSL).to receive(:new).and_return(dsl) + context = Object.new allow(Nanoc::Int::Context).to receive(:new).with(anything).and_return(context) expect(context).to receive(:pry) Nanoc::CLI.run(['shell'])