Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

overriding inspect method so it doesn't trigger scope find (for scrip…

…t/console)
  • Loading branch information...
commit 1b148b8b18f8458a17f4dc398776b7c88565ed31 1 parent 6e3215a
@ryanb authored
View
4 lib/scope_builder/builder.rb
@@ -13,5 +13,9 @@ def method_missing(method, *args, &block)
result
end
end
+
+ def inspect
+ sprintf("#<%s:%#0x>", self.class.to_s, self.object_id)
+ end
end
end
View
4 spec/scope_builder/builder_spec.rb
@@ -35,4 +35,8 @@
product.should == products[index]
end
end
+
+ it "should not include instance variables on inspect so it doesn't load proxy" do
+ @builder.inspect.should_not include('proxy_scope')
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.