Module: Specdown::Config
Instance Attribute Summary collapse
-
#expectations ⇒ Object
Returns the value of attribute expectations.
-
#format ⇒ Object
Returns the value of attribute format.
-
#reporter ⇒ Object
Returns the value of attribute reporter.
-
#root ⇒ Object
Returns the value of attribute root.
-
#tests ⇒ Object
Returns the value of attribute tests.
Instance Method Summary collapse
Instance Attribute Details
#expectations ⇒ Object
Returns the value of attribute expectations.
5 6 7 |
# File 'lib/specdown/config.rb', line 5 def expectations @expectations end |
#format ⇒ Object
Returns the value of attribute format.
9 10 11 |
# File 'lib/specdown/config.rb', line 9 def format @format end |
#reporter ⇒ Object
Returns the value of attribute reporter.
8 9 10 |
# File 'lib/specdown/config.rb', line 8 def reporter @reporter end |
#root ⇒ Object
Returns the value of attribute root.
7 8 9 |
# File 'lib/specdown/config.rb', line 7 def root @root end |
#tests ⇒ Object
Returns the value of attribute tests.
6 7 8 |
# File 'lib/specdown/config.rb', line 6 def tests @tests end |
Instance Method Details
#implicit_specs ⇒ Object
38 39 40 41 42 |
# File 'lib/specdown/config.rb', line 38 def implicit_specs return @implicit_specs if @implicit_specs implicit_spec_files = find_implicit_specs_in(root).map {|file| File.read(file)} @implicit_specs = Specdown::ImplicitParser.parse *implicit_spec_files end |
#reset! ⇒ Object
19 20 21 22 23 24 |
# File 'lib/specdown/config.rb', line 19 def reset! @expectations = nil @reporter = nil @root = nil @format = nil end |
#test_environment_files ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/specdown/config.rb', line 58 def test_environment_files unless @test_environment_files @test_environment_files = Dir["#{root}/**/*.rb"] unless root[0..0] == "/" @test_environment_files.map! {|file| File.join Dir.pwd, file} end end @test_environment_files end |