Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/sass_spec/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def self.parse
options = {
sass_executable: "sass",
spec_directory: "spec",
tap: false,
skip: false,
verbose: false,
filter: "",
Expand Down Expand Up @@ -41,6 +42,10 @@ def self.parse
options[:verbose] = true
end

opts.on("-t", "--tap", "Output TAP compatible report") do
options[:tap] = true
end

opts.on("-c", "--command COMMAND", "Sets a specific binary to run (defaults to '#{options[:sass_executable]}')") do |v|
options[:sass_executable] = v
end
Expand Down
8 changes: 6 additions & 2 deletions lib/sass_spec/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ def initialize(options = {})
end

def run
unless @options[:silent]
unless @options[:silent] || @options[:tap]
puts "Recursively searching under directory '#{@options[:spec_directory]}' for test files to test '#{@options[:sass_executable]}' with."

stdout, stderr, status = Open3.capture3("#{@options[:sass_executable]} -v")
puts stdout
end
Expand All @@ -26,6 +25,11 @@ def run
minioptions.push '--verbose'
end

if @options[:tap]
require 'minitap'
Minitest.reporter = Minitap::TapY
end

exit Minitest.run(minioptions)
end

Expand Down