Permalink
Browse files

Fixed specs/deprecations

  • Loading branch information...
1 parent 2e6b218 commit f2cdead0bed5206d98a951201bbdc2a256e6de39 Dimitrij Denissenko committed Sep 7, 2010
@@ -16,7 +16,7 @@ def do_get
end
it 'should load the examples' do
- WikiEngine.should_receive(:default).and_return(@engine)
+ WikiEngine.should_receive(:default_engine).and_return(@engine)
@engine.should_receive(:markup_examples).and_return(@examples)
do_get
assigns[:examples].should == @examples
@@ -46,7 +46,7 @@ def do_get
describe 'GET /show' do
before do
- @file = mock_model(WikiFile, :readable? => true, :send_arguments => ['path', {}], :created_at => 2.days.ago)
+ @file = mock_model(WikiFile, :readable? => true, :send_arguments => ['path', {}], :created_at => 2.days.ago, :redirect? => false)
@files_proxy.stub!(:find_by_wiki_title!).and_return(@file)
controller.stub!(:send_file)
controller.stub!(:render)
@@ -93,7 +93,7 @@ def do_get
describe 'GET /new' do
before do
- @file = stub_model(WikiFile).as_new_record
+ @file = mock_model(WikiFile, :new_record? => true)
@files_proxy.stub!(:new).and_return(@file)
end
@@ -119,7 +119,7 @@ def do_get
describe 'POST /create' do
before do
- @file = stub_model(WikiFile, :save => true).as_new_record
+ @file = mock_model(WikiFile, :new_record? => true, :save => true, :wiki_title= => nil)
@files_proxy.stub!(:new).and_return(@file)
end
@@ -22,7 +22,7 @@ def load!(config)
config.controller_paths += extension.controller_paths
config.eager_load_paths += extension.load_paths
- ActiveSupport::Dependencies.load_paths += extension.load_paths
+ ActiveSupport::Dependencies.autoload_paths += extension.load_paths
ActionController::Base.prepend_view_path(extension.view_paths)
extension.load_paths.reverse_each { |dir| $LOAD_PATH.unshift(dir) }

0 comments on commit f2cdead

Please sign in to comment.