Class: Rspec::Generators::SimplerCommand
- Inherits:
-
Base
- Object
- Base
- Rspec::Generators::SimplerCommand
- Defined in:
- lib/generators/rspec/simpler_command/simpler_command_generator.rb
Overview
Rspec SimplerCommand Generator.
Generates a spec for a command using SimplerCommand.
Provide arguments to assist with boilerplate generation of your commands.
Examples
rails generator rspec:simpler_command EnableMaintainance
# => spec/commands/enable_maintainance_spec.rb
rails generator rspec:simpler_command PublishArticle article
# => spec/commands/publish_article_spec.rb
Instance Method Summary collapse
Instance Method Details
#add_command_spec ⇒ Object
24 25 26 |
# File 'lib/generators/rspec/simpler_command/simpler_command_generator.rb', line 24 def add_command_spec template "command_spec.rb.erb", "spec/commands/#{file_name}_spec.rb" end |