Title: [waffle-scm] [829] trunk/waffle-ruby/src/test/ruby/specs/org/codehaus/waffle/servlet/waffle_spec.rb: Fixed rspec test expectations following ScriptLoader refactors.
Revision
829
Author
mauro
Date
2008-09-10 08:49:36 -0500 (Wed, 10 Sep 2008)

Log Message

Fixed rspec test expectations following ScriptLoader refactors.

Modified Paths


Diff

Modified: trunk/waffle-ruby/src/test/ruby/specs/org/codehaus/waffle/servlet/waffle_spec.rb (828 => 829)

--- trunk/waffle-ruby/src/test/ruby/specs/org/codehaus/waffle/servlet/waffle_spec.rb	2008-09-10 12:41:44 UTC (rev 828)
+++ trunk/waffle-ruby/src/test/ruby/specs/org/codehaus/waffle/servlet/waffle_spec.rb	2008-09-10 13:49:36 UTC (rev 829)
@@ -17,13 +17,14 @@
   end
 
   it "should use 'require' when path prefix does NOT begin with 'dir:' (as is the case in production)" do
-    paths = ['fake/dir/path/one', 'fake/dir/path/two']
+    paths = ['fake/dir/path/one.rb', 'fake/dir/path/two.rb']
 
     servlet_context = mock('servlet_context')
     servlet_context.should_receive(:getResourcePaths).with('fake/dir/path').and_return(paths)
+    servlet_context.should_receive(:getRealPath).twice.with('/').and_return('/')
 
-    Waffle::ScriptLoader.should_receive(:require).with('one')
-    Waffle::ScriptLoader.should_receive(:require).with('two')
+    Waffle::ScriptLoader.should_receive(:require).with('/one.rb')
+    Waffle::ScriptLoader.should_receive(:require).with('/two.rb')
     Waffle::ScriptLoader.load_all('fake/dir/path', servlet_context)
 
     Waffle::ScriptLoader.instance_variable_get(:@__servlet_context).should == servlet_context


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to