Sha256: 990abe6b275fdea488573942b0827ec631c99f091e52176ea72ace66980591cf

Contents?: true

Size: 368 Bytes

Versions: 18

Compression:

Stored size: 368 Bytes

Contents

require File.expand_path("spec_helper", File.dirname(__FILE__))

describe "r.run" do
  it "should allow composition of apps" do
    a = app do |r|
      r.on "services/:id" do |id|
        "View #{id}"
      end
    end

    app(:new) do |r|
      r.on "provider" do
        r.run a
      end
    end

    body("/provider/services/101").should == 'View 101'
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
roda-2.0.0 spec/composition_spec.rb
roda-1.3.0 spec/composition_spec.rb
roda-1.2.0 spec/composition_spec.rb
roda-1.1.0 spec/composition_spec.rb
roda-cj-1.0.5 spec/composition_spec.rb
roda-cj-1.0.4 spec/composition_spec.rb
roda-cj-1.0.3 spec/composition_spec.rb
roda-cj-1.0.2 spec/composition_spec.rb
roda-cj-1.0.1 spec/composition_spec.rb
roda-cj-1.0.0 spec/composition_spec.rb
roda-1.0.0 spec/composition_spec.rb
roda-cj-0.9.6 spec/composition_spec.rb
roda-cj-0.9.5 spec/composition_spec.rb
roda-cj-0.9.4 spec/composition_spec.rb
roda-cj-0.9.3 spec/composition_spec.rb
roda-cj-0.9.2 spec/composition_spec.rb
roda-cj-0.9.1 spec/composition_spec.rb
roda-0.9.0 spec/composition_spec.rb