spec/spec_helper.rb in optionsful-0.1.5 vs spec/spec_helper.rb in optionsful-0.1.6

- old
+ new

@@ -1,7 +1,10 @@ -require File.join(File.dirname(__FILE__), '..', 'lib','optionsful.rb') -require File.join(File.dirname(__FILE__), '..', 'lib','optionsful_docs.rb') +require File.join(File.dirname(__FILE__), '..', 'lib', "baurets", 'optionsful', "config.rb") +require File.join(File.dirname(__FILE__), '..', 'lib', "baurets", 'optionsful', "server.rb") +require File.join(File.dirname(__FILE__), '..', 'lib', "baurets", 'optionsful', "documentator.rb") +require File.join(File.dirname(__FILE__), '..', 'lib', "baurets", 'optionsful', "introspections.rb") +# TODO ^ this was ugly?! :-S require 'rubygems' require 'sinatra' require 'rack/test' require 'rack' @@ -39,11 +42,11 @@ def fake_opts_app app = Rack::Builder.new { use Rack::CommonLogger use Rack::ShowExceptions - use Optionsful + use Baurets::Optionsful::Server map "/lobster" do use Rack::Lint run Rack::Lobster.new end } @@ -51,11 +54,11 @@ def fake_docs_app app = Rack::Builder.new { use Rack::CommonLogger use Rack::ShowExceptions - use OptionsfulDocs + use Baurets::Optionsful::Documentator map "/lobster" do use Rack::Lint run Rack::Lobster.new end } @@ -65,10 +68,10 @@ FAKE_ENV.merge!(options) end def http_options_request(path) complex_env = mock_env({"REQUEST_METHOD" => "OPTIONS", "PATH_INFO" => path }) - response = Optionsful.new(app).call(complex_env) + response = Baurets::Optionsful::Server.new(app).call(complex_env) end def allows?(headers, method) headers["Allow"].include?(method) end