Module: Adva::Tasks::Test::Cucumber
Instance Method Summary collapse
- #cucumber_args ⇒ Object
- #cucumber_files ⇒ Object
- #cucumber_options ⇒ Object
- #cucumber_pattern ⇒ Object
Instance Method Details
#cucumber_args ⇒ Object
48 49 50 51 |
# File 'lib/adva/tasks/core.rb', line 48 def cucumber_args args = + cucumber_files args.flatten.compact end |
#cucumber_files ⇒ Object
53 54 55 56 57 |
# File 'lib/adva/tasks/core.rb', line 53 def cucumber_files paths = Adva.engines.map { |engine| engine.root.join('features/**/*.feature').to_s } paths = paths.select { |path| path.include?(pattern) } if pattern Dir["{#{paths.join(',')}}"].sort end |
#cucumber_options ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/adva/tasks/core.rb', line 63 def # programatically find out supported Cucumber options seems close to impossible because it # immediately calls parse! on its options as soon they are defined. # see http://github.com/aslakhellesoy/cucumber/blob/master/lib/cucumber/cli/options.rb#L261 = self..reject { |name, value| name.include?('rebuild') } .map { |name, value| ["--#{name}", value.is_a?(String) ? value : nil] }.flatten.compact end |
#cucumber_pattern ⇒ Object
59 60 61 |
# File 'lib/adva/tasks/core.rb', line 59 def cucumber_pattern self.respond_to?(:pattern) ? self.pattern : '' end |