Sha256: cb5a4ad0169e87ae7f162c5dfb88a2e87fefb3eefde9fe146b6f538affaed35c
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
# encoding: UTF-8 require 'simplecov' and SimpleCov.start do add_filter "spec/" end require 'mojito' describe Mojito::Base do subject do Mojito::C.runtime_controller Mojito::R::StatusCodes do on PATH('test.:extension') do ok! end end.mock_request end it { subject.get('/test.html').headers.should include('Content-Type') } it { subject.get('/test.html').headers['Content-Type'].should == 'text/html' } it { subject.get('/test.txt').headers.should include('Content-Type') } it { subject.get('/test.txt').headers['Content-Type'].should == 'text/plain' } it { subject.get('/test.rb').headers.should include('Content-Type') } it { subject.get('/test.rb').headers['Content-Type'].should == 'application/x-ruby' } context do subject do Class.new.tap do |c| c.class_exec do include Mojito::Base end end end it { subject.should respond_to(:new).with(1).argument } it { subject.should respond_to(:call).with(1).argument } it { subject.should respond_to(:dispatch).with(1).argument } end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mojito-0.2.6 | spec/mojito/base_spec.rb |
mojito-0.2.5 | spec/mojito/base_spec.rb |
mojito-0.2.4 | spec/mojito/base_spec.rb |
mojito-0.2.3 | spec/mojito/base_spec.rb |