Sha256: 321c8cf467af10aae49fbb6124f0c72d0f002fee0786cf05a75d8fec3410b6cd
Contents?: true
Size: 1.88 KB
Versions: 2
Compression:
Stored size: 1.88 KB
Contents
require 'spec_helper' describe 'view API - symbols' do use_helpers :app, :view before :each do remove_view :account, :edit create_view :account, :edit do %q{ <h1><%= title %></h1> } end end after :each do # remove_view :account end it "should have an account_view file that contains an index method and two inserted comments" do insert_into_view :account, :edit, :content => '# hello', :before => '<h1>' insert_into_view :account, :edit, :before => '<h1>' do '# goodbye' end puts read_view(:account, :edit) read_view(:account, :edit).should have_comment 'hello' # root_dir.should have_view :account do |view_file| # view_file.should have_method :index # view_file.should have_comment 'hello' # view_file.should have_comment 'goodbye' # end end end # describe 'view API - hash' do # use_helpers :app, :view # # before :each do # remove_view :account, :action => :edit # create_view :account, :action => :edit do # %q{ # <h1><%= title %></h1> # } # end # end # # after :each do # # remove_view :account # end # # it "should have an account_view file that contains an index method and two inserted comments" do # insert_into_view :account, :action => :edit, :content => '# hello', :before => '<h1>' # insert_into_view :account, :action => :edit, :before => '<h1>' do # '# goodbye' # end # puts read_view(:account, :action => :edit) # read_view(:account, :action => :edit).should have_comment 'hello' # puts view_file_name(:account, :edit) # # root_dir.should have_view :account do |view_file| # # view_file.should have_method :index # # view_file.should have_comment 'hello' # # view_file.should have_comment 'goodbye' # # end # end # end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails3_assist-0.2.4 | spec/rails3_assist/artifact/view_spec/view_controller_action_spec.rb |
rails3_assist-0.2.3 | spec/rails3_assist/artifact/view_spec/view_controller_action_spec.rb |