Sha256: 946af499e56b238ddeac9513545459536bf79e18c03bb4480fdc455645fbfd93
Contents?: true
Size: 879 Bytes
Versions: 3
Compression:
Stored size: 879 Bytes
Contents
# encoding: UTF-8 require 'simplecov' and SimpleCov.start do add_filter "spec/" end require 'mojito' describe Mojito do context do subject { Mojito.application {} } it { subject.ancestors.should include(Mojito::Base) } it { subject.should respond_to(:call) } end context do subject { Mojito.application(Mojito::Matchers::Path).new Rack::MockRequest.env_for('http://localhost/hello/world/rest') } it { subject.env.should_not be_nil } it { subject.request.should be_kind_of(Rack::Request) } it { subject.captures.should be_empty } it { subject.locals.should be_empty } it do subject.send(:__match?, proc { request.host == 'localhost' }) subject.captures.should be_empty subject.locals.should be_empty subject.path_info.should == '/hello/world/rest' end end context do subject do Mojito.application do end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mojito-0.1.2 | spec/mojito_spec.rb |
mojito-0.1.1 | spec/mojito_spec.rb |
mojito-0.1.0 | spec/mojito_spec.rb |