Class: Chemlab::Configuration
- Inherits:
-
Object
- Object
- Chemlab::Configuration
- Defined in:
- lib/chemlab/configuration.rb
Overview
Chemlab Configuration
Instance Attribute Summary collapse
-
#browser ⇒ Object
Returns the value of attribute browser.
-
#libraries ⇒ Object
Returns the value of attribute libraries.
Class Method Summary collapse
-
.add_config(name) ⇒ Object
Add a chemlab configuration.
Instance Method Summary collapse
-
#configure_rspec ⇒ Object
Call RSpec.configure for additional configuration.
Instance Attribute Details
#browser ⇒ Object
Returns the value of attribute browser.
13 14 15 |
# File 'lib/chemlab/configuration.rb', line 13 def browser @browser end |
#libraries ⇒ Object
Returns the value of attribute libraries.
19 20 21 |
# File 'lib/chemlab/configuration.rb', line 19 def libraries @libraries end |
Class Method Details
.add_config(name) ⇒ Object
Add a chemlab configuration
7 8 9 |
# File 'lib/chemlab/configuration.rb', line 7 def self.add_config(name) attr_accessor name end |
Instance Method Details
#configure_rspec ⇒ Object
Call RSpec.configure for additional configuration
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/chemlab/configuration.rb', line 30 def configure_rspec RSpec.configure do |rspec| yield rspec if block_given? # TODO Change this. /spec/api /spec/ui is hardcoded rspec.(file_path: Regexp.new('/spec/api')) do || [:type] = :api end rspec.(file_path: Regexp.new('/spec/ui')) do || [:type] = :ui end rspec.after(:each, type: :ui) do Chemlab.configuration.browser&.session&.engine&.quit end end end |