File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 101101
102102 RAILS_ROOT_DIR = File . expand_path ( "../../../rails" , __FILE__ )
103103
104- # NOTE: specs currently only test with a stubbed Rails::Railtie
105- describe "Rails (stubbed)" , :lib => :stub do
104+ describe "Rails (stubbed)" , :lib => :stub do # NOTE: specs currently only test with a stubbed Rails::Railtie
106105
107106 before :all do
108107 $LOAD_PATH. unshift File . join ( RAILS_ROOT_DIR , 'stub' ) # for require 'rails/railtie'
126125 $servlet_context = nil
127126 end
128127
128+ let ( :railtie_class ) { Class . new ( Rails ::Railtie ) }
129+
129130 it "should have loaded the railtie" do
130131 defined? ( JRuby ::Rack ::Railtie ) . should_not be nil
131132 end
137138 app = double ( "app" ) ; app . stub_chain ( :config , :paths ) . and_return ( paths )
138139 public_path = Pathname . new ( booter . public_path )
139140
140- Rails :: Railtie . config . __before_configuration . size . should == 1
141- before_config = Rails :: Railtie . config . __before_configuration . first
141+ railtie_class . config . __before_configuration . size . should == 1
142+ before_config = railtie_class . config . __before_configuration . first
142143 before_config . should_not be nil
143144
144145 before_config . call ( app )
155156 app = double ( "app" ) ; app . stub_chain ( :config , :paths ) . and_return ( paths )
156157 JRuby ::Rack . public_path = nil
157158
158- before_config = Rails :: Railtie . config . __before_configuration . first
159+ before_config = railtie_class . config . __before_configuration . first
159160 before_config . should_not be nil
160161 before_config . call ( app )
161162
You can’t perform that action at this time.
0 commit comments