class TestProf::RSpecDissect::Configuration
RSpecDisect configuration
Constants
- MODES
Attributes
let_stats_enabled[RW]
let_stats_enabled?[RW]
let_top_count[RW]
mode[R]
top_count[RW]
Public Class Methods
new()
click to toggle source
# File lib/test_prof/rspec_dissect.rb, line 45 def initialize @let_stats_enabled = true @let_top_count = (ENV["RD_PROF_LET_TOP"] || 3).to_i @top_count = (ENV["RD_PROF_TOP"] || 5).to_i @stamp = ENV["RD_PROF_STAMP"] @mode = ENV["RD_PROF"] == "1" ? "all" : ENV["RD_PROF"] unless MODES.include?(mode) raise "Unknown RSpecDissect mode: #{mode};" \ "available modes: #{MODES.join(", ")}" end RSpecStamp.config.tags = @stamp if stamp? end
Public Instance Methods
before?()
click to toggle source
# File lib/test_prof/rspec_dissect.rb, line 64 def before? mode == "all" || mode == "before" end
let?()
click to toggle source
# File lib/test_prof/rspec_dissect.rb, line 60 def let? mode == "all" || mode == "let" end
stamp?()
click to toggle source
# File lib/test_prof/rspec_dissect.rb, line 68 def stamp? !@stamp.nil? end