Class: Develry::Project::Initializer::Rspec
- Inherits:
-
Develry::Project::Initializer
- Object
- Develry::Project::Initializer
- Develry::Project::Initializer::Rspec
- Defined in:
- lib/develry/project/initializer/rspec.rb
Overview
Requires all shared specs in a project’s spec_helper Also installs a configurable unit test timeout
Class Method Summary collapse
-
.call(project) ⇒ Rspec
private
Initialize RSpec for
project
. - .require_files(directory) ⇒ Object
Instance Method Summary collapse
-
#call ⇒ self
private
Setup RSpec for #project.
-
#initialize(project) ⇒ undefined
constructor
private
Initialize a new instance.
Constructor Details
#initialize(project) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a new instance
54 55 56 57 58 |
# File 'lib/develry/project/initializer/rspec.rb', line 54 def initialize(project) super @spec_root = project.spec_root @unit_test_timeout = project.unit_test_timeout end |
Class Method Details
.call(project) ⇒ Rspec
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize RSpec for project
23 24 25 |
# File 'lib/develry/project/initializer/rspec.rb', line 23 def self.call(project) new(project).call end |
.require_files(directory) ⇒ Object
11 12 13 |
# File 'lib/develry/project/initializer/rspec.rb', line 11 def self.require_files(directory) Develry.require_files(directory, SHARED_SPEC_PATTERN) end |
Instance Method Details
#call ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Setup RSpec for Develry::Project::Initializer#project
65 66 67 68 69 70 |
# File 'lib/develry/project/initializer/rspec.rb', line 65 def call require 'rspec' require_shared_spec_files enable_unit_test_timeout unless Develry.jit? self end |