Class: RSpec::SimpleCov::Configuration
- Inherits:
-
Object
- Object
- RSpec::SimpleCov::Configuration
- Defined in:
- lib/rspec/simplecov/configuration.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
Returns the value of attribute backtrace.
-
#caller_path ⇒ Object
Returns the value of attribute caller_path.
-
#context_text ⇒ Object
Returns the value of attribute context_text.
-
#described_thing ⇒ Object
Returns the value of attribute described_thing.
-
#test_case_text ⇒ Object
Returns the value of attribute test_case_text.
Instance Method Summary collapse
- #context(text) ⇒ Object
- #describe(thing) ⇒ Object
-
#initialize(simplecov_instance, backtrace = [], &block) ⇒ Configuration
constructor
A new instance of Configuration.
- #it(what) ⇒ Object
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
#backtrace ⇒ Object
Returns the value of attribute backtrace.
5 6 7 |
# File 'lib/rspec/simplecov/configuration.rb', line 5 def backtrace @backtrace end |
#caller_path ⇒ Object
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_text ⇒ Object
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_thing ⇒ Object
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_text ⇒ Object
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 |