Sha256: 5aa79b186a02cf3016ab4b065545d080b13ed9c67f8261689dbfad83241ff548

Contents?: true

Size: 712 Bytes

Versions: 10

Compression:

Stored size: 712 Bytes

Contents

# frozen_string_literal: true

require "hanami/action"

module Bookshelf
  class App < Hanami::App
  end
end

module Web
end
Hanami.app.register_slice :web, namespace: Web

Hanami.prepare

module Web
  class Action < Hanami::Action
  end

  module Actions
    module Home
      class Index < Web::Action
      end
    end
  end
end

Hanami.app.routes do
  mount :web, at: "/" do
    root to: "home#index"
  end
end

RSpec.describe Hanami::Application do
  describe ".routes" do
    subject { Hanami.app.routes }

    it "returns configured routes" do
      expect(subject).to be_kind_of(Proc)
      # FIXME: make this expectation to pass
      # expect(subject.for(:web).url(:root)).to eq("/")
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hanami-2.0.3 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.2 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.1 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.0 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.0.rc1 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.0.beta4 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.0.beta3 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.0.beta2 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.0.beta1.1 spec/isolation/hanami/application/routes/configured_spec.rb
hanami-2.0.0.beta1 spec/isolation/hanami/application/routes/configured_spec.rb