Sha256: 50a453dc3c75ff3ef4b8d46ef6247727613cc26ad89842a5ebcf7b60d6b8797f
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
require 'spec_helper' require_generator :controller describe 'helper_generator' do use_helpers :controller, :special before do create_rails_app end after do remove_rails_app end before :each do setup_generator :controller do tests ControllerGenerator end remove_controller :account end after :each do remove_controller :account end it "should have created temporary Rails app with a Gemfile" read_gem_file.should_not be_empty end it "should not work without an Account controller file" do with_generator do |g| g.run_generator :account.args g.should_not generate_controller :account end end it "should decorate an existing Account controller file with a 'control_me' method" do with_generator do |g| create_controller :account do '# controller content' end g.run_generator :account.args g.should generate_controller :account do |content| content.should have_method :control_me end end end end
Version data entries
3 entries across 3 versions & 1 rubygems