spec/unit/utils/migrate_spec.rb in couchrest_model-2.0.4 vs spec/unit/utils/migrate_spec.rb in couchrest_model-2.1.0.beta1
- old
+ new
@@ -10,13 +10,13 @@
describe "#load_all_models" do
it "should not do anything if Rails is not available" do
@module.load_all_models
end
it "should detect if Rails is available and require models" do
- Rails = mock()
- Rails.stub!(:root).and_return("")
+ Rails = double()
+ Rails.stub(:root).and_return("")
Dir.should_receive(:[]).with("app/models/**/*.rb").and_return(['failed_require'])
- # we can't mock require, so just expect an error
+ # we can't double require, so just expect an error
expect {
@module.load_all_models
}.to raise_error(LoadError)
end
end