Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aruba.version to return version number #62

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

Aruba.version to return version number #62

hedgehog opened this issue Mar 23, 2011 · 1 comment

Comments

@hedgehog
Copy link

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants