रेल 3.2.1 ऐप, न्यूनतम और ऑटोटेस्ट-रेल रत्नों का उपयोग करके।टेस्ट/यूनिट, मिनीटेस्ट का उपयोग करके मैं ऑटोटैस्ट में रंगीन आउटपुट कैसे प्राप्त कर सकता हूं?
यदि मैं "रेक परीक्षण" चलाता हूं तो आउटपुट रंग में होता है। लेकिन अगर मैं ऑटोटेस्ट चलाता हूं, तो आउटपुट रंग में नहीं होता है।
ऑटोटेस्ट का उपयोग करते समय मुझे रंग आउटपुट कैसे मिल सकता है?
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'turn/autorun'
Turn.config do |c|
# use one of output formats:
# :outline - turn's original case/test outline mode [default]
# :progress - indicates progress with progress bar
# :dotted - test/unit's traditional dot-progress mode
# :pretty - new pretty reporter
# :marshal - dump output as YAML (normal run mode only)
# :cue - interactive testing
c.format = :pretty
# turn on invoke/execute tracing, enable full backtrace
c.trace = true
# use humanized test names (works only with :outline format)
c.natural = true
end
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
fixtures :all
# Add more helper methods to be used by all tests here...
end
ये दोनों लिंक मरने लगते हैं :( – alnorth29
पोस्ट 12 महीने से अधिक पुराना है! दोनों तकनीकों का उल्लेख करने के लिए, यहां दी गई दोनों तकनीकें अब काम नहीं करती हैं, लेकिन सिद्धांत अच्छा है, आपके पास होगा कोड में ढूंढने के लिए, या मणि लेखक से पूछें कि क्या रंगांकन को मजबूर करने का कोई तरीका है, जांच को छोड़कर आउटपुट एक टीटी है या नहीं। –