Sha256: 2d209e579dfb799cc7d14f1094b2b0e9d276f1bfe5ac6feb4aeb9972f41d4d00

Contents?: true

Size: 608 Bytes

Versions: 14

Compression:

Stored size: 608 Bytes

Contents

require "examples/example_helper"

module RR
describe Space, " class" do
  it_should_behave_like "RR::Space"

  before(:each) do
    @original_space = Space.instance
    @space = Space.new
    Space.instance = @space
  end

  after(:each) do
    Space.instance = @original_space
  end

  it "proxies to a singleton instance of Space" do
    create_double_args = nil
    (class << @space; self; end).class_eval do
      define_method :create_double do |*args|
        create_double_args = args
      end
    end

    Space.create_double(:foo, :bar)
    create_double_args.should == [:foo, :bar]
  end
end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rr-0.1.14 examples/rr/space/space_example.rb
rr-0.1.13 examples/rr/space_example.rb
rr-0.1.12 examples/rr/space_example.rb
rr-0.1.10 examples/rr/space_example.rb
rr-0.1.11 examples/rr/space_example.rb
rr-0.1.15 examples/rr/space/space_example.rb
rr-0.1.7 examples/rr/space_example.rb
rr-0.1.8 examples/rr/space_example.rb
rr-0.2.3 examples/rr/space/space_example.rb
rr-0.2.2 examples/rr/space/space_example.rb
rr-0.2.4 examples/rr/space/space_example.rb
rr-0.1.9 examples/rr/space_example.rb
rr-0.2.1 examples/rr/space/space_example.rb
rr-0.2.5 examples/rr/space/space_example.rb