Module: JayAPI::RSpec
- Defined in:
- lib/jay_api/rspec.rb,
lib/jay_api/rspec/git.rb,
lib/jay_api/rspec/configuration.rb,
lib/jay_api/rspec/test_data_collector.rb
Overview
A module that contains the classes and method needed to interact with RSpec data (test cases, test results, etc).
Defined Under Namespace
Modules: Git Classes: TestDataCollector
Class Method Summary collapse
-
.configuration ⇒ JayAPI::Configuration
The current configuration for JayAPI::RSpec.
-
.configure {|Class| ... } ⇒ Object
Called to configure the JayAPI::RSpec module.
Class Method Details
.configuration ⇒ JayAPI::Configuration
Returns The current configuration for JayAPI::RSpec.
13 14 15 16 17 18 19 20 21 |
# File 'lib/jay_api/rspec/configuration.rb', line 13 def self.configuration unless @configuration raise JayAPI::Errors::ConfigurationError, 'No configuration has been set for the JayAPI::RSpec module. ' \ 'Please call JayAPI::RSpec.configure to load/create configuration.' end @configuration end |
.configure {|Class| ... } ⇒ Object
Called to configure the JayAPI::RSpec module.
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/jay_api/rspec/configuration.rb', line 32 def self.configure configuration = yield JayAPI::Configuration return unless configuration unless configuration.is_a?(JayAPI::Configuration) raise JayAPI::Errors::ConfigurationError, 'Expected a JayAPI::Configuration or a subclass. ' \ "Got a #{configuration.class} instead." end @configuration = configuration end |