Class: Belly::Rerun

Inherits:
Object
  • Object
show all
Defined in:
lib/belly/cli/rerun.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Rerun

Returns a new instance of Rerun.



17
18
19
# File 'lib/belly/cli/rerun.rb', line 17

def initialize(options)

end

Instance Method Details

#run(ui) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/belly/cli/rerun.rb', line 21

def run(ui)
  scenarios = Belly.hub.get_failing_scenarios_for_project_named(Belly.config.project)
  todos = scenarios.map {  |scenario| "#{scenario["file_name"]}:#{scenario["line_number"]}" }
  todos.sort.each { |todo| puts todo }
  
rescue Client::NoSuchProjectError
  ui.die("Belly doesn't know enough about this project yet. Please run some tests, then try again.")
end