Sha256: 3886df842e4054aefa4bc6437403260827be26e74a64a5805d0073665451b9f4

Contents?: true

Size: 463 Bytes

Versions: 2

Compression:

Stored size: 463 Bytes

Contents

$:.unshift 'lib'
require 'example_app'
set :environment, :test

require 'exemplor'
require 'rack/test'

eg.helpers do
  include Rack::Test::Methods
  def app; Sinatra::Application end
end

eg "Requesting an action built from a scope" do
  Check(get('/projects/a/users/2').body).is('Project A, User 2')
  Check(get('/projects/b/users/1').body).is('Project B, User 1')
end

eg "Scope with no path pattern" do
  Check(get('/sekret/squirrel').body).is('squirrel')
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinatra-scopes-1.0.0 examples.rb
sinatra-scopes-0.1.0 examples.rb