This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Hongli Lai (Phusion) (author)
Tue Apr 29 15:05:10 -0700 2008
| c296409f » | Hongli Lai (Phusion) | 2008-02-27 | 1 | require 'support/config' | |
| 9d714c0d » | Hongli Lai (Phusion) | 2008-03-01 | 2 | require 'passenger/application' | |
| 16201608 » | Hongli Lai (Phusion) | 2008-03-01 | 3 | include Passenger | |
| c296409f » | Hongli Lai (Phusion) | 2008-02-27 | 4 | ||
| 5 | describe Application do | ||||
| 6 | it "should correctly detect Rails version numbers specified in environment.rb" do | ||||
| 7 | rails_version = Application.detect_framework_version('stub/railsapp') | ||||
| 8 | rails_version.should =~ /^2\.0\.(\d+)$/ | ||||
| 9 | end | ||||
| 10 | |||||
| b77b49bb » | Hongli Lai (Phusion) | 2008-03-31 | 11 | it "should return :vendor if an application uses a vendored Rails" do | |
| c296409f » | Hongli Lai (Phusion) | 2008-02-27 | 12 | rails_version = Application.detect_framework_version('stub/minimal-railsapp') | |
| b77b49bb » | Hongli Lai (Phusion) | 2008-03-31 | 13 | rails_version.should == :vendor | |
| 14 | end | ||||
| 15 | |||||
| 16 | it "should return nil if an application does not specify its Rails version" do | ||||
| 17 | rails_version = Application.detect_framework_version('stub/railsapp-without-version-spec') | ||||
| c296409f » | Hongli Lai (Phusion) | 2008-02-27 | 18 | rails_version.should be_nil | |
| 19 | end | ||||
| cec5c76b » | Hongli Lai (Phusion) | 2008-03-07 | 20 | ||
| 21 | it "should raise VersionNotFound if a nonexistant Rails version is specified" do | ||||
| 22 | detector = lambda { Application.detect_framework_version('stub/broken-railsapp4') } | ||||
| 23 | detector.should raise_error(VersionNotFound) | ||||
| 24 | end | ||||
| c296409f » | Hongli Lai (Phusion) | 2008-02-27 | 25 | end | |






