Skip to content

Instantly share code, notes, and snippets.

@gongo
Created February 21, 2013 23:25
Show Gist options
  • Save gongo/5009402 to your computer and use it in GitHub Desktop.
Save gongo/5009402 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'table_beet'
require "turnip"
Dir.glob("steps/**/*steps.rb") { |f| load f, true }
RSpec.configuration.include_or_extend_modules.each do |ioe, mod, filters|
c = Class.new.extend(mod)
step_names = c.methods.grep(/^match: (?<step_name>.+)/) { $~[:step_name] }
next if step_names.empty?
tag = filters.keys.first
p "#{tag} =>"
step_names.each do |step|
method = c.method(step)
p " step => #{step} , #{method.source_location}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment