Sha256: bfd9a0910a9b93074a80344307532ef3c192d437709c8db531f3062a9fff2888

Contents?: true

Size: 820 Bytes

Versions: 3

Compression:

Stored size: 820 Bytes

Contents

require 'spec_helper'

describe 'view' do
  use_helpers :app, :view

  before :each do              
    remove_view :account        
    create_view :account do
      %q{  def index
  end}
    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, :content => '# hello', :before => 'def'
    insert_into_view :account, :before => 'def' do
      '# goodbye'
    end
    puts read_view(:account)
    read_view(:account).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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails3_assist-0.2.4 spec/rails3_assist/artifact/view_spec/view_controller_default_action_specc.rb
rails3_assist-0.2.3 spec/rails3_assist/artifact/view_spec/view_controller_default_action_specc.rb
rails3_assist-0.2.2 spec/rails3_assist/artifact/view_spec/view_spec.rb