Module: RailChaser
- Defined in:
- lib/rail_chaser.rb,
lib/rail_chaser/task.rb,
lib/rail_chaser/storage.rb,
lib/rail_chaser/version.rb,
lib/rail_chaser/configuration.rb,
lib/rail_chaser/example_collection.rb
Defined Under Namespace
Classes: Configuration, ExampleCollection, Storage, Task
Constant Summary collapse
- VERSION =
'0.0.3'
Class Attribute Summary collapse
-
.collection ⇒ Object
Returns the value of attribute collection.
-
.config ⇒ Object
Returns the value of attribute config.
-
.storage ⇒ Object
Returns the value of attribute storage.
Class Method Summary collapse
Class Attribute Details
.collection ⇒ Object
Returns the value of attribute collection.
7 8 9 |
# File 'lib/rail_chaser.rb', line 7 def collection @collection end |
.config ⇒ Object
Returns the value of attribute config.
7 8 9 |
# File 'lib/rail_chaser.rb', line 7 def config @config end |
.storage ⇒ Object
Returns the value of attribute storage.
7 8 9 |
# File 'lib/rail_chaser.rb', line 7 def storage @storage end |
Class Method Details
.finish ⇒ Object
28 29 30 31 |
# File 'lib/rail_chaser.rb', line 28 def finish set_trace_func(nil) @storage.save!(@collection) end |
.on {|@config| ... } ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rail_chaser.rb', line 9 def on @config = Configuration.new yield @config if block_given? @collection = ExampleCollection.new(@config.) @storage = Storage.create(@config.) RSpec.configure do |config| config.before(:suite) { start } config.after(:suite) { finish } end end |
.start ⇒ Object
22 23 24 25 26 |
# File 'lib/rail_chaser.rb', line 22 def start set_trace_func proc { |event, file, line, method, binding, klass| @collection.add_example(file) } end |