Skip to content

Commit

Permalink
Merge branch 'main' into FI-2384-reactgfm
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyssaWang authored Jan 31, 2024
2 parents 2576145 + b178d40 commit 0ad8744
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/inferno/apps/cli/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require_relative 'suite'
require_relative 'suites'
require_relative 'new'
require_relative '../../version'

module Inferno
module CLI
Expand Down Expand Up @@ -52,6 +53,11 @@ def suites
subcommand 'suite', Suite

register(New, 'new', 'new TEST_KIT_NAME', 'Run `inferno new --help` for full help')

desc 'version', "Output Inferno core version (#{Inferno::VERSION})"
def version
puts "Inferno Core v#{Inferno::VERSION}"
end
end
end
end
12 changes: 12 additions & 0 deletions spec/inferno/apps/cli/main_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'rspec'
require 'thor'
require 'inferno/apps/cli/main'
require 'inferno/version'

RSpec.describe Inferno::CLI::Main do # rubocop:disable RSpec/FilePath
context 'with version command' do
it 'outputs current Inferno version' do
expect { described_class.new.version }.to output("Inferno Core v#{Inferno::VERSION}\n").to_stdout
end
end
end

0 comments on commit 0ad8744

Please sign in to comment.