Sha256: cc80bcd087b14663f496017dc47d9f0f9df76f9edd29b4a4103832ffc4fff3ba

Contents?: true

Size: 506 Bytes

Versions: 17

Compression:

Stored size: 506 Bytes

Contents

require 'test_helper'
require 'camping'

Camping.goes :Inline

module Inline::Controllers
  class Index
    def get
      @world = "World"
      render :index
    end
  end

  class UserX
    def get(name)
      @name = name
      render :user
    end
  end
end

class Inline::Test < TestCase
  def test_inline
    get '/'
    assert_body "Hello World"

    get '/user/Bluebie'
    assert_body "My name is Bluebie"
  end
end

__END__

@@ index.erb
Hello <%= @world %>

@@ user.erb
My name is <%= @name %>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
camping-3.2.6 test/app_inline_templates.rb
camping-3.2.5 test/app_inline_templates.rb
camping-3.2.4 test/app_inline_templates.rb
camping-3.2.3 test/app_inline_templates.rb
camping-3.2.2 test/app_inline_templates.rb
camping-3.2.1 test/app_inline_templates.rb
camping-3.2.0 test/app_inline_templates.rb
camping-3.1.3 test/app_inline_templates.rb
camping-3.1.2 test/app_inline_templates.rb
camping-3.1.0 test/app_inline_templates.rb
camping-3.0.2 test/app_inline_templates.rb
camping-3.0.1 test/app_inline_templates.rb
camping-3.0.0 test/app_inline_templates.rb
camping-2.1.532 test/app_inline_templates.rb
camping-2.1.531 test/app_inline_templates.rb
camping-2.1.523 test/app_inline_templates.rb
camping-2.1.467 test/app_inline_templates.rb