Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Aruba.version to return version number #62

Closed
hedgehog opened this Issue · 1 comment

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
Owner

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

@mattwynne mattwynne closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.