~ubuntu-branches/ubuntu/wily/ruby-passenger/wily-proposed

« back to all changes in this revision

Viewing changes to test/ruby/rails4.0/preloader_spec.rb

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-11-23 23:50:02 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20131123235002-8fdhsq7afj15o2z2
Tags: 4.0.25-1
* New upstream release.
* Refresh fix_install_path.patch.
* Build for Ruby 2.0 instead of 1.8. (Closes: #725591)
* Add fix_ftbfs_fortify_source.patch.
* Install passenger template files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
 
2
require 'ruby/shared/loader_sharedspec'
 
3
require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
 
4
 
 
5
if RUBY_VERSION_INT >= 190
 
6
module PhusionPassenger
 
7
 
 
8
describe "Rack loader with Rails 4.0" do
 
9
        include LoaderSpecHelper
 
10
 
 
11
        before :each do
 
12
                @stub = register_stub(RackStub.new("rails4.0"))
 
13
        end
 
14
 
 
15
        def start(options = {})
 
16
                @preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
 
17
                result = @preloader.start(options)
 
18
                if result[:status] == "Ready"
 
19
                        @loader = @preloader.spawn(options)
 
20
                        return @loader.start(options)
 
21
                else
 
22
                        return result
 
23
                end
 
24
        end
 
25
 
 
26
        def rails_version
 
27
                return "4.0"
 
28
        end
 
29
 
 
30
        include_examples "analytics logging extensions for Rails"
 
31
end
 
32
 
 
33
end # module PhusionPassenger
 
34
end