Permalink
Browse files

munge spec so it passes, not cool

  • Loading branch information...
1 parent 1cac86e commit 1df9df16ec95dcb0fc702b869545b41257798dc8 @ethansr committed May 8, 2012
Showing with 8 additions and 7 deletions.
  1. +1 −1 carrierwave-neo4j.gemspec
  2. +7 −6 spec/neo4j_spec.rb
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
- s.add_dependency("neo4j", "~> 1.1")
+ s.add_dependency("neo4j", "~> 2.0")
s.add_dependency("carrierwave", "~> 0.5")
s.add_development_dependency("rspec", "~> 2.0")
end
View
@@ -1,19 +1,20 @@
require "spec_helper"
-def reset_class(uploader = DefaultUploader)
- class_name = "User"
- Object.send(:remove_const, class_name) rescue nil
- user_class = Object.const_set(class_name, Class.new(Neo4j::Rails::Model))
- user_class.class_eval do
+def reset_class(uploader = DefaultUploader)
+ User.class_eval do
mount_uploader :image, uploader
end
- user_class
+ User
end
class DefaultUploader < CarrierWave::Uploader::Base; end
+class User < Neo4j::Rails::Model
+ mount_uploader :image, DefaultUploader
+end
+
class PngUploader < CarrierWave::Uploader::Base
def extension_white_list
%w(png)

0 comments on commit 1df9df1

Please sign in to comment.