Sha256: 78aa9e8331315d49c3f31a56b4b62f55851d1a422f3c1dcd2a904288f2d7b77a

Contents?: true

Size: 708 Bytes

Versions: 1

Compression:

Stored size: 708 Bytes

Contents

require 'spec_helper'

describe 'rails view helper' do
  use_helper :view

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

  after do
    # remove_view :account, :edit
  end

  describe '#have_view' do
    it "should have an account/edit view file that displays a title" do
      root_dir.should have_view :account, :edit do |klass|
        klass.should match /<%=\s*title\s*%>/
      end
    end
  end
  
  describe '#have_view_file' do
    it "should have an account/edit view file that displays a title" do
      root_dir.should have_view_file :account, :edit do |file|
        file.should match /<%=\s*title\s*%>/
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-app-spec-0.5.0 spec/rails_app_spec/matchers/artifact/view_spec.rb