Sha256: 986795efd07c05fdb606a4f6c15af5a49cff526d140858e95053f2c9ebe6d49d

Contents?: true

Size: 744 Bytes

Versions: 2

Compression:

Stored size: 744 Bytes

Contents

require 'spec_helper'
require 'ronin/db/cli/commands/irb'

describe Ronin::DB::CLI::Commands::Irb do
  describe "#run" do
    it "must call #connet, then #load_models, then CLI::RubyShell.start" do
      expect(subject).to receive(:connect)
      expect(subject).to receive(:load_models)
      expect(Ronin::DB::CLI::RubyShell).to receive(:start)

      subject.run
    end

    context "when #options[:no_connect] is set" do
      before { subject.options[:no_connect] = true }

      it "must not call #connet or #load_models" do
        expect(subject).to_not receive(:connect)
        expect(subject).to_not receive(:load_models)
        expect(Ronin::DB::CLI::RubyShell).to receive(:start)

        subject.run
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ronin-db-0.1.0.beta1-java spec/cli/commands/irb_spec.rb
ronin-db-0.1.0.beta1 spec/cli/commands/irb_spec.rb