Class: Frameworks::Cucumber
- Inherits:
-
Object
- Object
- Frameworks::Cucumber
- Includes:
- Base
- Defined in:
- lib/soundcheck/frameworks/cucumber.rb
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#command(*args) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/soundcheck/frameworks/cucumber.rb', line 17 def command(*args) args = (args.empty? ? default_args : filter(*args)) return nil if args.empty? to_run = [] to_run << "bundle exec" if has_gemfile? to_run << "cucumber #{args.join(" ")}".strip to_run.join(" ") end |
#default_args ⇒ Object
13 14 15 |
# File 'lib/soundcheck/frameworks/cucumber.rb', line 13 def default_args ["features"] end |
#filter(*args) ⇒ Object
9 10 11 |
# File 'lib/soundcheck/frameworks/cucumber.rb', line 9 def filter(*args) args.select { |arg| arg =~ /\.feature$/ } end |
#present? ⇒ Boolean
5 6 7 |
# File 'lib/soundcheck/frameworks/cucumber.rb', line 5 def present? project.has_file?("features") end |