Class: EacRubyGemSupport::Rspec::SpecPathsController
- Inherits:
-
Object
- Object
- EacRubyGemSupport::Rspec::SpecPathsController
- Defined in:
- lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb
Instance Attribute Summary collapse
- #spec_file ⇒ Pathname readonly
Instance Method Summary collapse
- #fixtures_directory ⇒ Pathname
- #initialize(example, spec_file) ⇒ Object constructor
- #spec_directory ⇒ Pathname
Constructor Details
#initialize(example, spec_file) ⇒ Object
14 15 16 |
# File 'lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb', line 14 common_constructor :example, :spec_file do self.spec_file = spec_file.to_pathname end |
Instance Attribute Details
#spec_file ⇒ Pathname (readonly)
|
# File 'lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb', line 8
|
Instance Method Details
#fixtures_directory ⇒ Pathname
19 20 21 |
# File 'lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb', line 19 def fixtures_directory spec_directory.join(spec_file.basename('.*')).basename_sub { |b| "#{b}_files" } end |
#spec_directory ⇒ Pathname
24 25 26 |
# File 'lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb', line 24 def spec_directory spec_file.parent end |