Sha256: 3660c749587d89304f3b4f8fdb9f4693ad769c4690b9abe0aa9e7e635423fef9
Contents?: true
Size: 842 Bytes
Versions: 1
Compression:
Stored size: 842 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe 'helper' do helpers :helper before :each do remove_helper :account create_helper :account do %q{ def index end } end end after :each do # remove_helper :account end it "should have an account_helper file that contains an index method and two inserted comments" do insert_into_helper :account, :content => '# hello' insert_into_helper :account do '# goodbye' end read_helper(:account).should have_comment 'hello' Rails.application.should have_helper :account do |helper_file| helper_file.should have_method :index helper_file.should have_comment 'hello' helper_file.should have_comment 'goodbye' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
generator-spec-0.5.0 | spec/generator_spec/rails_helpers/rails_helper_spec.rb |