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 101
101
102
102
RAILS_ROOT_DIR = File . expand_path ( "../../../rails" , __FILE__ )
103
103
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
106
105
107
106
before :all do
108
107
$LOAD_PATH. unshift File . join ( RAILS_ROOT_DIR , 'stub' ) # for require 'rails/railtie'
126
125
$servlet_context = nil
127
126
end
128
127
128
+ let ( :railtie_class ) { Class . new ( Rails ::Railtie ) }
129
+
129
130
it "should have loaded the railtie" do
130
131
defined? ( JRuby ::Rack ::Railtie ) . should_not be nil
131
132
end
137
138
app = double ( "app" ) ; app . stub_chain ( :config , :paths ) . and_return ( paths )
138
139
public_path = Pathname . new ( booter . public_path )
139
140
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
142
143
before_config . should_not be nil
143
144
144
145
before_config . call ( app )
155
156
app = double ( "app" ) ; app . stub_chain ( :config , :paths ) . and_return ( paths )
156
157
JRuby ::Rack . public_path = nil
157
158
158
- before_config = Rails :: Railtie . config . __before_configuration . first
159
+ before_config = railtie_class . config . __before_configuration . first
159
160
before_config . should_not be nil
160
161
before_config . call ( app )
161
162
You can’t perform that action at this time.
0 commit comments