Sha256: a20d9ede7f5b592ebc95a4e1687a74740a9b26ba4c79f297bbc8d0d3bd3adec5

Contents?: true

Size: 567 Bytes

Versions: 4

Compression:

Stored size: 567 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

class JstTest < UnitTest
  class App < Sinatra::Base
    register Sinatra::JstPages
    disable :show_exceptions
    enable :raise_errors

    set :views, File.expand_path('../app/views', __FILE__)
    serve_jst '/jst.js'
  end
  def app() App; end

  test "jst" do
    get '/jst.js'
    body = last_response.body

    assert body.include? 'window.JST'

    assert body.include? '["editor/edit"]'
    assert body.include? "Hello"

    assert body.include? '["chrome"]'
    assert body.include? "chrome"
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
sinatra-backbone-2-0.1.1 test/jst_test.rb
sinatra-backbone-0.1.1 test/jst_test.rb
sinatra-backbone-0.1.0.rc2 test/jst_test.rb
sinatra-backbone-0.1.0.rc1 test/jst_test.rb