Aruba.version to return version number #62

Closed
hedgehog opened this Issue Mar 23, 2011 · 1 comment

Projects

None yet

2 participants

@hedgehog

If, as intended a library uses Aruba's steps, then to document the combined available steps in a feature the following step definition is required:

Then /^these steps are defined:$/ do |table|
  rsc = ::Cucumber::Runtime::SupportCode.new 'ui', :autoload_code_paths => 'lib/cuken/cucumber'
  rsc.load_files! ['lib/cuken/cucumber/file.rb', "#{ENV['GEM_HOME']}/gems/aruba-0.3.3/lib/aruba/cucumber.rb"]
  sd_array = rsc.step_definitions
  table.hashes.each do |hsh|
    sd_array.each{|sd| res = sd.regexp_source == %Q{/^#{hsh['step']}$/}; break if res}
  end
end

It is possible to avoid hard coding the Aruba version number, if Aruba.version returns the version string.

@mattwynne
Cucumber member

Please submit a pull request if you'd like this feature.

@mattwynne mattwynne closed this Nov 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment