Permalink
Browse files

Got specs passing

  • Loading branch information...
1 parent ee20248 commit 93ed4a2ef1360ea427ee70b2525fb2af5e678c83 @ianwhite committed Mar 14, 2011
Showing with 2 additions and 24 deletions.
  1. +2 −0 autotest/discover.rb
  2. +0 −24 spec/pickle/adapter_spec.rb
View
@@ -1,3 +1,5 @@
+require 'autotest/bundler'
+
Autotest.add_hook :initialize do |autotest|
%w{.git .DS_Store ._* vendor tmp email}.each do |exception|
autotest.add_exception(exception)
@@ -18,23 +18,6 @@
before do
Pickle::Adapter.model_classes = nil
end
-
- it "should only include #suitable_for_pickle classes" do
- klass1 = Class.new(ActiveRecord::Base)
- klass2 = Class.new(ActiveRecord::Base)
- klass3 = Class.new(ActiveRecord::Base)
- klass4 = Class.new(ActiveRecord::Base)
- klass5 = Class.new(ActiveRecord::Base)
- klass6 = Class.new(ActiveRecord::Base)
- [klass1, klass2, klass3, klass4, klass5, klass6].each { |k| k.stub!(:table_exists?).and_return(true) }
-
- klass2.stub!(:name).and_return("CGI::Session::ActiveRecordStore::Session")
- klass3.stub!(:name).and_return("ActiveRecord::SessionStore::Session")
- klass4.stub!(:table_exists?).and_return(false)
- klass5.stub!(:abstract_class?).and_return(true)
- Pickle::Adapter.model_classes.should include(klass1, klass6)
- Pickle::Adapter.model_classes.should_not include(klass2, klass3, klass4, klass5)
- end
end
describe "adapters: " do
@@ -55,13 +38,6 @@
ActiveRecord::Base::PickleAdapter.model_classes
end
-
- it "calls .subclasses when .descendants doesn't respond" do
- ::ActiveRecord::Base.should_receive(:subclasses).and_return([])
-
- ActiveRecord::Base::PickleAdapter.model_classes
- end
-
end
describe 'with class stubs' do

0 comments on commit 93ed4a2

Please sign in to comment.