Skip to content

Instantly share code, notes, and snippets.

@kaishuu0123
Created January 15, 2015 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaishuu0123/edc8bf78a93c0141d8ff to your computer and use it in GitHub Desktop.
Save kaishuu0123/edc8bf78a93c0141d8ff to your computer and use it in GitHub Desktop.
rspec middleware test
module MiddlewareExampleGroup
def self.included(base)
base.class_eval do
let(:app) {
Rack::Builder.new do
eval File.read(Rails.root.join('config.ru'))
end
}
end
end
RSpec.configure do |config|
config.include self,
:example_group => { :file_path => %r{spec/requests} }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment