Class: RspecStarterTask
- Inherits:
-
RspecStarterStep
- Object
- RspecStarterStep
- RspecStarterTask
- Defined in:
- lib/rspec_starter/rspec_starter_task.rb
Overview
Tasks are classes that implement an ‘execute’ method. Tasks can execute any ruby code they want inside the ‘execute’ method. Tasks are defined by listing their name inside the RspecStarter.start block:
RspecStarter.start do
task :verify_display_server
task :rebuild_rails_app_database, stop_on_problem: true
task :start_rspec, quiet: true
end
Tasks accept a ‘quiet` option which tells the task to be more or less verbose. Tasks accept a `stop_on_problem` method that determines whether a problem should cause the entire start-up process to stop when the task encounters a problem.
Direct Known Subclasses
RebuildRailsAppDatabase, RemoveTmpFolder, StartRspec, VerifyDisplayServer
Instance Attribute Summary
Attributes inherited from RspecStarterStep
#exit_status, #id, #name, #options, #quiet, #run_time, #runner, #successful
Class Method Summary collapse
- .description ⇒ Object
-
.name_for_class(klass) ⇒ Object
Convert something like VerifyDisplayServer to :verify_display_server.
- .register_option(hash) ⇒ Object
Methods inherited from RspecStarterStep
default_quiet, default_stop_on_problem, #failed?, #helpers, #initialize, provide_options_to, #quiet?, register_options, #run, #should_skip?, #stop_on_problem?, #verbose?
Constructor Details
This class inherits a constructor from RspecStarterStep
Class Method Details
.description ⇒ Object
17 18 19 |
# File 'lib/rspec_starter/rspec_starter_task.rb', line 17 def self.description "" end |
.name_for_class(klass) ⇒ Object
Convert something like VerifyDisplayServer to :verify_display_server
22 23 24 |
# File 'lib/rspec_starter/rspec_starter_task.rb', line 22 def self.name_for_class(klass) klass.name.underscore.to_sym end |
.register_option(hash) ⇒ Object
13 14 15 |
# File 'lib/rspec_starter/rspec_starter_task.rb', line 13 def self.register_option(hash) @options_registrar.register_task_option(self, **hash) end |