Module: Decidim::Dev
- Defined in:
- lib/decidim/dev.rb,
lib/decidim/dev/railtie.rb
Overview
Decidim::Dev holds all the convenience logic and libraries to be able to create external libraries that create test apps and test themselves against them.
Defined Under Namespace
Classes: Railtie
Class Method Summary collapse
-
.asset(name) ⇒ Object
Public: Finds an asset.
-
.dummy_app_path ⇒ Object
Public: Get the dummy application path and raises an error if it is not set.
-
.dummy_app_path=(path) ⇒ Object
Public: Sets the dummy application path for testing.
-
.install_tasks ⇒ Object
Public: add rake tasks.
Class Method Details
.asset(name) ⇒ Object
Public: Finds an asset.
Returns a String with the path for a particular asset.
13 14 15 |
# File 'lib/decidim/dev.rb', line 13 def self.asset(name) File.(File.join(__dir__, "dev", "assets", name)) end |
.dummy_app_path ⇒ Object
Public: Get the dummy application path and raises an error if it is not set.
32 33 34 35 36 37 38 |
# File 'lib/decidim/dev.rb', line 32 def self.dummy_app_path unless @dummy_app_path raise StandardError, "Please, add Decidim::Dev::dummy_app_path = File.expand_path(File.join(\"..\", \"spec\", \"decidim_dummy_app\")) to\n your spec helper with the path to the generated dummy app" end @dummy_app_path end |
.dummy_app_path=(path) ⇒ Object
Public: Sets the dummy application path for testing.
path - A string value defining the path.
27 28 29 |
# File 'lib/decidim/dev.rb', line 27 def self.dummy_app_path=(path) @dummy_app_path = path end |
.install_tasks ⇒ Object
Public: add rake tasks
18 19 20 21 22 |
# File 'lib/decidim/dev.rb', line 18 def self.install_tasks Dir[File.join(__dir__, "../tasks/*.rake")].each do |file| load file end end |