Class: TestProf::RSpecDissect::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/test_prof/rspec_dissect.rb

Overview

RSpecDisect configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



47
48
49
50
51
52
53
54
# File 'lib/test_prof/rspec_dissect.rb', line 47

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"]

  RSpecStamp.config.tags = @stamp if stamp?
end

Instance Attribute Details

#let_stats_enabledObject Also known as: let_stats_enabled?

Returns the value of attribute let_stats_enabled.



42
43
44
# File 'lib/test_prof/rspec_dissect.rb', line 42

def let_stats_enabled
  @let_stats_enabled
end

#let_top_countObject

Returns the value of attribute let_top_count.



42
43
44
# File 'lib/test_prof/rspec_dissect.rb', line 42

def let_top_count
  @let_top_count
end

#top_countObject

Returns the value of attribute top_count.



42
43
44
# File 'lib/test_prof/rspec_dissect.rb', line 42

def top_count
  @top_count
end

Instance Method Details

#stamp?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/test_prof/rspec_dissect.rb', line 56

def stamp?
  !@stamp.nil?
end