Class: QUnit::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/qunit/install_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#javascripts_pathObject

Returns the value of attribute javascripts_path.



12
13
14
# File 'lib/generators/qunit/install_generator.rb', line 12

def javascripts_path
  @javascripts_path
end

#stylesheets_pathObject

Returns the value of attribute stylesheets_path.



12
13
14
# File 'lib/generators/qunit/install_generator.rb', line 12

def stylesheets_path
  @stylesheets_path
end

Instance Method Details

#create_javascript_test_helperObject



20
21
22
# File 'lib/generators/qunit/install_generator.rb', line 20

def create_javascript_test_helper
  create_test_helper("javascripts_extension", javascripts_path)
end

#create_stylesheet_test_helperObject



24
25
26
# File 'lib/generators/qunit/install_generator.rb', line 24

def create_stylesheet_test_helper
  create_test_helper("stylesheets_extension", stylesheets_path)
end

#initialize_configObject



14
15
16
17
18
# File 'lib/generators/qunit/install_generator.rb', line 14

def initialize_config
  qunit = ::Rails.application.config.qunit
  self.javascripts_path = File.join(qunit.tests_path, qunit.javascripts_path)
  self.stylesheets_path = File.join(qunit.tests_path, qunit.stylesheets_path)
end