Class: Rspec::Generators::Base Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
Rspec::Generators::AuthenticationGenerator, Rspec::Generators::ChannelGenerator, Rspec::Generators::ControllerGenerator, Rspec::Generators::FeatureGenerator, Rspec::Generators::GeneratorGenerator, Rspec::Generators::HelperGenerator, Rspec::Generators::JobGenerator, Rspec::Generators::MailboxGenerator, Rspec::Generators::MailerGenerator, Rspec::Generators::ModelGenerator, Rspec::Generators::RequestGenerator, Rspec::Generators::ScaffoldGenerator, Rspec::Generators::SystemGenerator, Rspec::Generators::ViewGenerator
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Rails::Generators::NamedBase
|
|
Instance Chain:
self,
::RSpec::Rails::FeatureCheck ,
Rails::Generators::NamedBase
|
|
Inherits: |
Rails::Generators::NamedBase
|
Defined in: | rspec-rails/lib/generators/rspec.rb |
Class Method Summary
-
.configuration
Internal use only
Load configuration from
::RSpec
to ensure–default-path
is set. - .source_root(path = nil) Internal use only
Instance Method Summary
- #target_path(*paths) Internal use only
::RSpec::Rails::FeatureCheck
- Included
Class Method Details
.configuration
Load configuration from ::RSpec
to ensure –default-path
is set
# File 'rspec-rails/lib/generators/rspec.rb', line 25
def self.configuration @configuration ||= begin configuration = RSpec.configuration = RSpec::Core::ConfigurationOptions.new({}) .configure(configuration) configuration end end
.source_root(path = nil)
[ GitHub ]# File 'rspec-rails/lib/generators/rspec.rb', line 15
def self.source_root(path = nil) if path @_rspec_source_root = path else @_rspec_source_root ||= File. (File.join(File.dirname(__FILE__), 'rspec', generator_name, 'templates')) end end
Instance Method Details
#target_path(*paths)
[ GitHub ]# File 'rspec-rails/lib/generators/rspec.rb', line 35
def target_path(*paths) File.join(self.class.configuration.default_path, *paths) end