Skip to content

Commit

Permalink
Added specs for CLI::DebugOption (issue #38).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jun 5, 2024
1 parent af569f3 commit cd63193
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions spec/cli/debug_option_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require 'spec_helper'
require 'ronin/recon/cli/debug_option'
require 'ronin/recon/cli/command'

describe Ronin::Recon::CLI::DebugOption do
module TestDebugOption
class TestCommand < Ronin::Recon::CLI::Command
include Ronin::Recon::CLI::DebugOption
end
end

let(:command_class) { TestDebugOption::TestCommand }
subject { command_class.new }

describe "options" do
before { subject.option_parser.parse(argv) }

describe "when the '--debug' option is given" do
let(:argv) { %w[--debug] }

it "must set Console.logger.level to Console::Logger::DEBUG" do
expect(Console.logger.level).to be(Console::Logger::DEBUG)
end
end
end
end

0 comments on commit cd63193

Please sign in to comment.