Skip to content

Commit

Permalink
Add testing flexibility
Browse files Browse the repository at this point in the history
Prior to this commit all bolt tests had to be run in order to check a small change.  This commit allow individual tests to be re-run to shorten the dev iteration cycle.

Signed-off-by: Gavin Didrichsen <[email protected]>
  • Loading branch information
gavindidrichsen committed Jan 15, 2025
1 parent d6fba02 commit 5e42ca3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rakelib/tests.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ begin

desc "Run RSpec tests that do not require VM fixtures or a particular shell"
RSpec::Core::RakeTask.new(:unit) do |t|
t.pattern = "spec/unit/**/*_spec.rb"
if ENV['TEST']
t.pattern = "spec/unit/**/*_spec.rb"
t.rspec_opts = "-e '#{ENV['TEST']}'"
elsif ENV['FILE']
t.pattern = ENV['FILE']
else
t.pattern = "spec/unit/**/*_spec.rb"
end
end

desc 'Run tests that require a host System Under Test configured with WinRM'
Expand Down

0 comments on commit 5e42ca3

Please sign in to comment.