Class: Frameworks::Expresso
- Inherits:
-
Object
- Object
- Frameworks::Expresso
- Includes:
- Base
- Defined in:
- lib/soundcheck/frameworks/expresso.rb
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#command(*args) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/soundcheck/frameworks/expresso.rb', line 19 def command(*args) args = (args.empty? ? default_args : filter(*args)) return nil if args.empty? local_expresso = "node_modules/expresso/bin/expresso" expresso_bin = project.has_file?(local_expresso) ? local_expresso : "expresso" "#{expresso_bin} --include lib #{args.join(" ")}" end |
#default_args ⇒ Object
15 16 17 |
# File 'lib/soundcheck/frameworks/expresso.rb', line 15 def default_args ["test/*"] end |
#filter(*args) ⇒ Object
9 10 11 12 13 |
# File 'lib/soundcheck/frameworks/expresso.rb', line 9 def filter(*args) filter_with(args, { :is_js_file => /\.js$/ }) end |
#present? ⇒ Boolean
5 6 7 |
# File 'lib/soundcheck/frameworks/expresso.rb', line 5 def present? project.has_file?("test/*.js") end |