Class: EacRubyGemSupport::Rspec::SpecPathsController

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_filePathname (readonly)



# File 'lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb', line 8


Instance Method Details

#fixtures_directoryPathname



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_directoryPathname



24
25
26
# File 'lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb', line 24

def spec_directory
  spec_file.parent
end