Sha256: c2d231cc5645383d5a97eb3820f1332d705f38f0ebd4d98e47c6f5a6f75266aa
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
module RSpec::Rails module Controller include RSpec::Rails::BaseHelper def controller_file_name name, options=nil artifact_path name, :controller end # CREATE def create_controller name, options={}, &block create_artifact(name, set(options, :controller), &block) end # UPDATE def insert_into_controller(name, options={}, &block) insert_content(name, set(options, :controller), &block) end # READ def read_controller(name, options={}, &block) read_artifact(name, set(options, :controller), &block) end # DELETE def remove_controller name remove_artifact name, :controller end def remove_controllers *names remove_artifacts :controller, *names end def controller_marker name, options=nil "#{name.to_s.camelize}Controller < ActionController::Base" end def new_controller_content name, content=nil, &block new_artifact_content name, :controller, content, &block end aliases_for :controller end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
generator-spec-0.5.0 | lib/generator_spec/rails_helpers/rails_controller.rb |