Sha256: b4031985f0b355d01c3914e2d75e692859b4bab0be1714fd2ec3e310c6271603

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'
require 'fixtures/project/controller'

RSpec.describe Rail::Application do
  it 'handles uncompressed Haml assets' do
    controller = Controller.new do
      config.compress = false
    end
    body = controller.process('/')
    expect(body.strip).to eq <<-BODY.strip
<!DOCTYPE html>
<html>
  <head>
    <title>Hello</title>
  </head>
  <body>
    <h1>Hello</h1>
  </body>
</html>
    BODY
  end

  it 'handles compressed Haml assets' do
    controller = Controller.new do
      config.compress = true
    end
    body = controller.process('/')
    expect(body.strip).to eq <<-BODY.strip
<!DOCTYPE html>
<html>
<head>
<title>Hello</title>
</head>
<body>
<h1>Hello</h1>
</body>
</html>
    BODY
  end

  it 'handles layouts' do
    controller = Controller.new do
      config.compress = false
    end
    body = controller.process('/articles/about')
    expect(body.strip).to eq <<-BODY.strip
<!DOCTYPE html>
<html>
  <head>
    <title>Hello</title>
  </head>
  <body>
    <h1>About</h1>
  </body>
</html>
    BODY
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rail-0.1.1 spec/features/haml_spec.rb
rail-0.1.0 spec/features/haml_spec.rb
rail-0.0.8 spec/features/haml_spec.rb