Sha256: f3d4ed54f87dda17b9c2d8d3188bd95db888b797abd0c84cc60e7fae0798a362

Contents?: true

Size: 695 Bytes

Versions: 1

Compression:

Stored size: 695 Bytes

Contents

dir = File.dirname __FILE__
crystal_dir = File.expand_path "#{dir}/../.."
lib_dir = "#{crystal_dir}/lib"
$LOAD_PATH << lib_dir unless $LOAD_PATH.include? lib_dir

require 'crystal/http'
require 'crystal/router'

require 'spec_ext'
require 'crystal/spec/environment'

Spec::Example::ExampleGroup.class_eval do
  def self.with_router_spec
    before :all do
      crystal.after :environment do        
        crystal.register :router, :depends_on => :environment do
          Crystal::Router.new(:class, [[:default_router, Crystal::DefaultRouter.new]])
        end
      
        crystal.conveyors.web.use Crystal::Processors::Router, :class_variable, :method_variable
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
crystal_ext-0.0.11 spec/router/helper.rb