spec/lib/pickle_adapter_spec.rb in ianwhite-pickle-0.1.5 vs spec/lib/pickle_adapter_spec.rb in ianwhite-pickle-0.1.6

- old
+ new

@@ -7,11 +7,19 @@ it "#create should raise NotImplementedError" do lambda{ Pickle::Adapter.new.create }.should raise_error(NotImplementedError) end - it ".model_classes should not include CGI::Session::ActiveRecordStore" do - Pickle::Adapter.model_classes.should_not include(CGI::Session::ActiveRecordStore) + if defined?(CGI::Session::ActiveRecordStore::Session) + it ".model_classes should not include CGI::Session::ActiveRecordStore::Session" do + Pickle::Adapter.model_classes.should_not include(CGI::Session::ActiveRecordStore) + end + end + + if defined?(ActiveRecord::SessionStore::Session) + it ".model_classes should not include ActiveRecord::SessionStore::Session" do + Pickle::Adapter.model_classes.should_not include(ActiveRecord::SessionStore::Session) + end end describe '::ActiveRecord' do before do # set up a fake object space \ No newline at end of file