Sha256: 519f1ba2393cd4c58a60874fc2bf6570b11daeb1737ff35d341239f8fff37c68

Contents?: true

Size: 547 Bytes

Versions: 2

Compression:

Stored size: 547 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')

describe 'rails view helper' do
  include RSpec::Rails::View

  before :each do              
    create_view :account, :edit do
      %q{
        <h1><%= title %></h1>
      }
    end    
  end

  after :each do              
    remove_view :account, :edit
  end
    
  it "should have an account/edit view file that displays a title" do      
    Rails.application.should have_view :account, :edit do |file|
      file.should match /<%=\s*title\s*%>/
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
generator-spec-0.4.8 spec/generator_spec/matchers/rails/view_matcher_spec.rb
generator-spec-0.4.7 spec/generator_spec/matchers/rails/view_matcher_spec.rb