spec/bogus/proxy_class_spec.rb in bogus-0.0.2 vs spec/bogus/proxy_class_spec.rb in bogus-0.0.3.rc.1
- old
+ new
@@ -1,10 +1,12 @@
require 'spec_helper'
describe Bogus::ProxyClass do
module SampleModule
class GrandLibrary
+ SAMPLE_CONSTANT = "foo"
+
def checkout(book, user)
:checkouted
end
def self.find_by_address(address)
@@ -65,9 +67,13 @@
proxy_class.find_by_isbn("some isbn") rescue nil
expect {
interactions_repository.return_value(:fake_name, :find_by_isbn, "some isbn")
}.to raise_error(StandardError)
+ end
+
+ it "allows accessing the constants defined on proxied class" do
+ proxy_class::SAMPLE_CONSTANT.should == "foo"
end
class FakeRepository
def initialize
@recordings = []