Class: RSpec::SimpleCov::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/simplecov/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(simplecov_instance, backtrace = [], &block) ⇒ Configuration

Returns a new instance of Configuration.



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/rspec/simplecov/configuration.rb', line 20

def initialize( simplecov_instance, backtrace = [],  &block )
  @described_thing = simplecov_instance
  
  @caller_path = backtrace[0].split(':').first
  @backtrace = backtrace

  @context_text = "#minimum_coverage"
  @test_case_text = "must be at least #{simplecov_instance.minimum_coverage}%"

  Docile.dsl_eval( self, &block ) if block_given?
end

Instance Attribute Details

#backtraceObject

Returns the value of attribute backtrace.



5
6
7
# File 'lib/rspec/simplecov/configuration.rb', line 5

def backtrace
  @backtrace
end

#caller_pathObject

Returns the value of attribute caller_path.



5
6
7
# File 'lib/rspec/simplecov/configuration.rb', line 5

def caller_path
  @caller_path
end

#context_textObject

Returns the value of attribute context_text.



5
6
7
# File 'lib/rspec/simplecov/configuration.rb', line 5

def context_text
  @context_text
end

#described_thingObject

Returns the value of attribute described_thing.



5
6
7
# File 'lib/rspec/simplecov/configuration.rb', line 5

def described_thing
  @described_thing
end

#test_case_textObject

Returns the value of attribute test_case_text.



5
6
7
# File 'lib/rspec/simplecov/configuration.rb', line 5

def test_case_text
  @test_case_text
end

Instance Method Details

#context(text) ⇒ Object



12
13
14
# File 'lib/rspec/simplecov/configuration.rb', line 12

def context text
  @context_text = text
end

#describe(thing) ⇒ Object



8
9
10
# File 'lib/rspec/simplecov/configuration.rb', line 8

def describe thing
  @described_thing = thing
end

#it(what) ⇒ Object



16
17
18
# File 'lib/rspec/simplecov/configuration.rb', line 16

def it what
  @test_case_text = what
end