Sha256: 2dd14e979347e5b91ee5bb7cabb26181120485ae78bab94b0bf589c7c4f3d1d9
Contents?: true
Size: 580 Bytes
Versions: 3
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true require "hanami/routes" RSpec.describe Hanami::Routes do describe ".define" do it "sets routes block" do routes_class = Class.new(described_class) routes_class.define { "Dummy routes" } expect(routes_class.routes.call).to eq("Dummy routes") end end describe ".routes" do context "when called before the routes have been defined" do it "raises an error" do routes_class = Class.new(described_class) expect { routes_class.routes }.to raise_error(RuntimeError) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hanami-2.0.0.beta2 | spec/unit/hanami/routes_spec.rb |
hanami-2.0.0.beta1.1 | spec/unit/hanami/routes_spec.rb |
hanami-2.0.0.beta1 | spec/unit/hanami/routes_spec.rb |