Sha256: b79005413a6a713f23377c9ee8e70f2a0e4e72262fa912ab8c10b7e5894a691e

Contents?: true

Size: 886 Bytes

Versions: 13

Compression:

Stored size: 886 Bytes

Contents

require 'spec_helper'

describe 'view' do
  use_helpers :view

  before :each do              
    Rails3::Assist::Directory.rails_root = fixtures_dir

    remove_view :account if has_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

13 entries across 13 versions & 1 rubygems

Version Path
rails3_artifactor-0.2.7 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.2.6 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.2.5 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.2.4 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.2.3 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.2.2 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.2.1 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.1.5 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.1.4 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.1.3 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.1.2 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.1.1 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb
rails3_artifactor-0.1.0 spec/rails3_artifactor/artifact/crud/view_controller_default_action_spec.rb