robe-server 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/.gitignore +1 -0
 - data/.rspec +3 -0
 - data/.travis.yml +19 -0
 - data/Gemfile +10 -0
 - data/Gemfile.lock +85 -0
 - data/LICENSE +674 -0
 - data/README.md +21 -0
 - data/Rakefile +10 -0
 - data/lib/robe-server.rb +39 -0
 - data/lib/robe/core_ext.rb +37 -0
 - data/lib/robe/jvisor.rb +14 -0
 - data/lib/robe/sash.rb +215 -0
 - data/lib/robe/sash/doc_for.rb +57 -0
 - data/lib/robe/sash/includes_tracker.rb +75 -0
 - data/lib/robe/scanners.rb +49 -0
 - data/lib/robe/server.rb +87 -0
 - data/lib/robe/type_space.rb +57 -0
 - data/lib/robe/visor.rb +56 -0
 - data/robe-server.gemspec +19 -0
 - data/spec/robe/jvisor_spec.rb +30 -0
 - data/spec/robe/method_scanner_spec.rb +50 -0
 - data/spec/robe/module_scanner_spec.rb +76 -0
 - data/spec/robe/sash/doc_for_spec.rb +165 -0
 - data/spec/robe/sash/includes_tracker_spec.rb +35 -0
 - data/spec/robe/sash_spec.rb +420 -0
 - data/spec/robe/server_spec.rb +64 -0
 - data/spec/robe/type_space_spec.rb +126 -0
 - data/spec/robe/visor_spec.rb +91 -0
 - data/spec/robe_spec.rb +51 -0
 - data/spec/spec_helper.rb +39 -0
 - data/spec/support/mocks.rb +31 -0
 - metadata +116 -0
 
| 
         @@ -0,0 +1,64 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'robe/server'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'net/http'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            describe Robe::Server do
         
     | 
| 
      
 6 
     | 
    
         
            +
              it "starts up and serves an empty response" do
         
     | 
| 
      
 7 
     | 
    
         
            +
                resp = start_and_send(proc {}, Net::HTTP::Get.new("/"))
         
     | 
| 
      
 8 
     | 
    
         
            +
                expect(resp.body).to eq("")
         
     | 
| 
      
 9 
     | 
    
         
            +
              end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              it "passes path and body to the handler" do
         
     | 
| 
      
 12 
     | 
    
         
            +
                rpath = nil
         
     | 
| 
      
 13 
     | 
    
         
            +
                rbody = nil
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                handler = proc do |path, body|
         
     | 
| 
      
 16 
     | 
    
         
            +
                  rpath = path
         
     | 
| 
      
 17 
     | 
    
         
            +
                  rbody = body
         
     | 
| 
      
 18 
     | 
    
         
            +
                  ""
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                req = Net::HTTP::Post.new("/foo")
         
     | 
| 
      
 22 
     | 
    
         
            +
                req.body = "bar\ntee"
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                start_and_send(handler, req)
         
     | 
| 
      
 25 
     | 
    
         
            +
                expect(rpath).to eq("/foo")
         
     | 
| 
      
 26 
     | 
    
         
            +
                expect(rbody).to eq("bar\ntee")
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              it "responds with whatever the handler returns" do
         
     | 
| 
      
 30 
     | 
    
         
            +
                handler = proc { "foobles" }
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                resp = start_and_send(handler, Net::HTTP::Get.new("/"))
         
     | 
| 
      
 33 
     | 
    
         
            +
                expect(resp.body).to eq("foobles")
         
     | 
| 
      
 34 
     | 
    
         
            +
              end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
              it "prints out exceptions raised in the handler" do
         
     | 
| 
      
 37 
     | 
    
         
            +
                handler = proc { raise Exception.new("down with the king!") }
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                begin
         
     | 
| 
      
 40 
     | 
    
         
            +
                  $stderr = StringIO.new
         
     | 
| 
      
 41 
     | 
    
         
            +
                  start_and_send(handler, Net::HTTP::Get.new("/"))
         
     | 
| 
      
 42 
     | 
    
         
            +
                  $stderr.seek(0)
         
     | 
| 
      
 43 
     | 
    
         
            +
                  expect($stderr.read).to match("down with the king!\n")
         
     | 
| 
      
 44 
     | 
    
         
            +
                ensure
         
     | 
| 
      
 45 
     | 
    
         
            +
                  $stderr = STDERR
         
     | 
| 
      
 46 
     | 
    
         
            +
                end
         
     | 
| 
      
 47 
     | 
    
         
            +
              end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
              def start_and_send(handler, request)
         
     | 
| 
      
 50 
     | 
    
         
            +
                server = described_class.new(handler, 0)
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                Thread.new do
         
     | 
| 
      
 53 
     | 
    
         
            +
                  Thread.current.abort_on_exception = true
         
     | 
| 
      
 54 
     | 
    
         
            +
                  server.start
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                server.wait_for_it
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
                http = Net::HTTP.new("127.0.0.1", server.port)
         
     | 
| 
      
 60 
     | 
    
         
            +
                http.request(request)
         
     | 
| 
      
 61 
     | 
    
         
            +
              ensure
         
     | 
| 
      
 62 
     | 
    
         
            +
                server.shutdown
         
     | 
| 
      
 63 
     | 
    
         
            +
              end
         
     | 
| 
      
 64 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,126 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # -*- coding: utf-8 -*-
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'support/mocks'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'robe/type_space'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            describe Robe::TypeSpace do
         
     | 
| 
      
 7 
     | 
    
         
            +
              context "#initialize" do
         
     | 
| 
      
 8 
     | 
    
         
            +
                it "resolves simple class" do
         
     | 
| 
      
 9 
     | 
    
         
            +
                  space = described_class.new(Robe::Visor.new, "String", nil, true, nil)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  expect(space.target_type).to eq String
         
     | 
| 
      
 11 
     | 
    
         
            +
                  expect(space.instance).to be_true
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                it "resolves nested class" do
         
     | 
| 
      
 15 
     | 
    
         
            +
                  space = described_class.new(Robe::Visor.new, "Stat", "File", nil, nil)
         
     | 
| 
      
 16 
     | 
    
         
            +
                  expect(space.target_type).to eq File::Stat
         
     | 
| 
      
 17 
     | 
    
         
            +
                  expect(space.instance).to be_nil
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                it "resolves constant to its type" do
         
     | 
| 
      
 21 
     | 
    
         
            +
                  space = described_class.new(Robe::Visor.new, "E", "Math", nil, nil)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  expect(space.target_type).to eq Float
         
     | 
| 
      
 23 
     | 
    
         
            +
                  expect(space.instance).to be_true
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
              context "#scan_with" do
         
     | 
| 
      
 28 
     | 
    
         
            +
                let(:scanner) { double("scanner") }
         
     | 
| 
      
 29 
     | 
    
         
            +
                let(:m) { Module.new }
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                context "instance search" do
         
     | 
| 
      
 32 
     | 
    
         
            +
                  let(:c) { mod = m; Class.new { include mod } }
         
     | 
| 
      
 33 
     | 
    
         
            +
                  let(:kids) { [Class.new(c), Class.new(c)] }
         
     | 
| 
      
 34 
     | 
    
         
            +
                  let(:visor) { ScopedVisor.new(*kids, {"C" => c}) }
         
     | 
| 
      
 35 
     | 
    
         
            +
                  let(:space) { described_class.new(visor, "C", nil, true, nil) }
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                  it "passes class and its ancestors" do
         
     | 
| 
      
 38 
     | 
    
         
            +
                    expect(scanner).to receive(:scan)
         
     | 
| 
      
 39 
     | 
    
         
            +
                      .with(include(c, Object, BasicObject, Kernel), true, false)
         
     | 
| 
      
 40 
     | 
    
         
            +
                    expect(scanner).not_to receive(:scan).with(include(Class), any_args())
         
     | 
| 
      
 41 
     | 
    
         
            +
                    space.scan_with(scanner)
         
     | 
| 
      
 42 
     | 
    
         
            +
                  end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                  it "passes included module" do
         
     | 
| 
      
 45 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(include(m), true, false)
         
     | 
| 
      
 46 
     | 
    
         
            +
                    space.scan_with(scanner)
         
     | 
| 
      
 47 
     | 
    
         
            +
                  end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                  it "passes the descendants" do
         
     | 
| 
      
 50 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(include(*kids), true, false)
         
     | 
| 
      
 51 
     | 
    
         
            +
                    space.scan_with(scanner)
         
     | 
| 
      
 52 
     | 
    
         
            +
                  end
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
                  it "passes Kernel even when scanning a module" do
         
     | 
| 
      
 55 
     | 
    
         
            +
                    visor = ScopedVisor.new(m, {"M" => m})
         
     | 
| 
      
 56 
     | 
    
         
            +
                    space = described_class.new(visor, "M", nil, true, nil)
         
     | 
| 
      
 57 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(include(Kernel), true, false)
         
     | 
| 
      
 58 
     | 
    
         
            +
                    space.scan_with(scanner)
         
     | 
| 
      
 59 
     | 
    
         
            +
                  end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                  context "super search" do
         
     | 
| 
      
 62 
     | 
    
         
            +
                    let(:visor) { ScopedVisor.new(*kids, {"C" => c}) }
         
     | 
| 
      
 63 
     | 
    
         
            +
                    let(:space) { described_class.new(visor, "C", nil, true, true) }
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                    it "does not pass the descendants" do
         
     | 
| 
      
 66 
     | 
    
         
            +
                      expect(scanner).not_to receive(:scan).with(include(*kids), true, false)
         
     | 
| 
      
 67 
     | 
    
         
            +
                      space.scan_with(scanner)
         
     | 
| 
      
 68 
     | 
    
         
            +
                    end
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                    it "does not pass the class itself" do
         
     | 
| 
      
 71 
     | 
    
         
            +
                      expect(scanner).not_to receive(:scan).with(include(c), true, false)
         
     | 
| 
      
 72 
     | 
    
         
            +
                      space.scan_with(scanner)
         
     | 
| 
      
 73 
     | 
    
         
            +
                    end
         
     | 
| 
      
 74 
     | 
    
         
            +
                  end
         
     | 
| 
      
 75 
     | 
    
         
            +
                end
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                context "module search" do
         
     | 
| 
      
 78 
     | 
    
         
            +
                  let(:n) { Module.new }
         
     | 
| 
      
 79 
     | 
    
         
            +
                  let(:c) do
         
     | 
| 
      
 80 
     | 
    
         
            +
                    mod = m;
         
     | 
| 
      
 81 
     | 
    
         
            +
                    Class.new { include mod }.tap do |c|
         
     | 
| 
      
 82 
     | 
    
         
            +
                      mod = n
         
     | 
| 
      
 83 
     | 
    
         
            +
                      c.singleton_class.class_eval { include mod }
         
     | 
| 
      
 84 
     | 
    
         
            +
                    end
         
     | 
| 
      
 85 
     | 
    
         
            +
                  end
         
     | 
| 
      
 86 
     | 
    
         
            +
                  let(:kids) { [Class.new(c), Class.new(c)] }
         
     | 
| 
      
 87 
     | 
    
         
            +
                  let(:visor) { ScopedVisor.new(*kids, {"C" => c}) }
         
     | 
| 
      
 88 
     | 
    
         
            +
                  let(:space) { described_class.new(visor, "C", nil, nil, nil) }
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
                  it "passes class and its ancestors, then metaclass ancestors" do
         
     | 
| 
      
 91 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(include(c, Object), be_false, true)
         
     | 
| 
      
 92 
     | 
    
         
            +
                    expect(scanner).to receive(:scan)
         
     | 
| 
      
 93 
     | 
    
         
            +
                      .with(include(Class, Module, Kernel, n), true, be_false)
         
     | 
| 
      
 94 
     | 
    
         
            +
                    space.scan_with(scanner)
         
     | 
| 
      
 95 
     | 
    
         
            +
                  end
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
                  it "passes the descendants" do
         
     | 
| 
      
 98 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(include(*kids), be_false, true)
         
     | 
| 
      
 99 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(anything, true, be_false)
         
     | 
| 
      
 100 
     | 
    
         
            +
                    space.scan_with(scanner)
         
     | 
| 
      
 101 
     | 
    
         
            +
                  end
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
                  it "doesn't pass the included modules" do
         
     | 
| 
      
 104 
     | 
    
         
            +
                    expect(scanner).not_to receive(:scan).with(include(m), be_false, true)
         
     | 
| 
      
 105 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(anything, be_false, true)
         
     | 
| 
      
 106 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(anything, true, be_false)
         
     | 
| 
      
 107 
     | 
    
         
            +
                    space.scan_with(scanner)
         
     | 
| 
      
 108 
     | 
    
         
            +
                  end
         
     | 
| 
      
 109 
     | 
    
         
            +
                end
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
                context "search ActiveSupport::Concern deps" do
         
     | 
| 
      
 112 
     | 
    
         
            +
                  let(:asc) { Module.new }
         
     | 
| 
      
 113 
     | 
    
         
            +
                  let(:m) { mod = asc; Module.new { extend mod } }
         
     | 
| 
      
 114 
     | 
    
         
            +
                  let(:deps) { [Module.new, Module.new] }
         
     | 
| 
      
 115 
     | 
    
         
            +
                  let(:visor) { ScopedVisor.new("M" => m) }
         
     | 
| 
      
 116 
     | 
    
         
            +
                  let(:space) { described_class.new(visor, "M", nil, true, false) }
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
      
 118 
     | 
    
         
            +
                  it "passes the dependencies" do
         
     | 
| 
      
 119 
     | 
    
         
            +
                    stub_const("ActiveSupport::Concern", asc)
         
     | 
| 
      
 120 
     | 
    
         
            +
                    m.instance_variable_set("@_dependencies", deps)
         
     | 
| 
      
 121 
     | 
    
         
            +
                    expect(scanner).to receive(:scan).with(include(*deps), true, false)
         
     | 
| 
      
 122 
     | 
    
         
            +
                    space.scan_with(scanner)
         
     | 
| 
      
 123 
     | 
    
         
            +
                  end
         
     | 
| 
      
 124 
     | 
    
         
            +
                end
         
     | 
| 
      
 125 
     | 
    
         
            +
              end
         
     | 
| 
      
 126 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,91 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'robe/visor'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            describe Robe::Visor do
         
     | 
| 
      
 5 
     | 
    
         
            +
              let(:v) { described_class.new }
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
              context ".resolve_const" do
         
     | 
| 
      
 8 
     | 
    
         
            +
                it "resolves ARGF.class" do
         
     | 
| 
      
 9 
     | 
    
         
            +
                  expect(v.resolve_const("ARGF.class")).to be(ARGF.class)
         
     | 
| 
      
 10 
     | 
    
         
            +
                end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                if RUBY_ENGINE == "ruby" && RUBY_VERSION < "2.1"
         
     | 
| 
      
 13 
     | 
    
         
            +
                  it "resolves IO::readable and IO::writable" do
         
     | 
| 
      
 14 
     | 
    
         
            +
                    readable = v.resolve_const("IO::readable")
         
     | 
| 
      
 15 
     | 
    
         
            +
                    writable = v.resolve_const("IO::writable")
         
     | 
| 
      
 16 
     | 
    
         
            +
                    expect(readable.method_defined?(:readline)).to be_true
         
     | 
| 
      
 17 
     | 
    
         
            +
                    expect(writable.method_defined?(:puts)).to be_true
         
     | 
| 
      
 18 
     | 
    
         
            +
                    expect(writable.method_defined?(:readline)).to be_false
         
     | 
| 
      
 19 
     | 
    
         
            +
                    expect(readable.method_defined?(:puts)).to be_false
         
     | 
| 
      
 20 
     | 
    
         
            +
                  end
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                it "silently fails on nil" do
         
     | 
| 
      
 24 
     | 
    
         
            +
                  expect(v.resolve_const(nil)).to be_nil
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                it "resolves simple constant" do
         
     | 
| 
      
 28 
     | 
    
         
            +
                  expect(v.resolve_const("Object")).to be(Object)
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                it "resolves explicit global scope" do
         
     | 
| 
      
 32 
     | 
    
         
            +
                  expect(v.resolve_const("::String")).to be(String)
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                it "resolves nested class" do
         
     | 
| 
      
 36 
     | 
    
         
            +
                  expect(v.resolve_const("File::Stat")).to be(File::Stat)
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                it "swallows NameError" do
         
     | 
| 
      
 40 
     | 
    
         
            +
                  expect(v.resolve_const("Foo::Bar")).to be_nil
         
     | 
| 
      
 41 
     | 
    
         
            +
                end
         
     | 
| 
      
 42 
     | 
    
         
            +
              end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
              context ".resolve_context" do
         
     | 
| 
      
 45 
     | 
    
         
            +
                it "defaults to the module if no name" do
         
     | 
| 
      
 46 
     | 
    
         
            +
                  expect(v.resolve_context(nil, "File")).to be(File)
         
     | 
| 
      
 47 
     | 
    
         
            +
                end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                it "accepts explicit scope qualifier" do
         
     | 
| 
      
 50 
     | 
    
         
            +
                  expect(v.resolve_context("::String", "File")).to be(String)
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                it "sees nested constants" do
         
     | 
| 
      
 54 
     | 
    
         
            +
                  expect(v.resolve_context("Stat", "File")).to be(File::Stat)
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                it "sees constants in containing scopes" do
         
     | 
| 
      
 58 
     | 
    
         
            +
                  expect(v.resolve_context("Stat", "File::Constants")).to be(File::Stat)
         
     | 
| 
      
 59 
     | 
    
         
            +
                end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                it "returns nil when not found" do
         
     | 
| 
      
 62 
     | 
    
         
            +
                  expect(v.resolve_context("Boo", "File::Constants")).to be_nil
         
     | 
| 
      
 63 
     | 
    
         
            +
                end
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                it "prioritizes deeper nesting" do
         
     | 
| 
      
 66 
     | 
    
         
            +
                  m = Module.new do
         
     | 
| 
      
 67 
     | 
    
         
            +
                    module self::A; end
         
     | 
| 
      
 68 
     | 
    
         
            +
                    module self::N
         
     | 
| 
      
 69 
     | 
    
         
            +
                      module self::A
         
     | 
| 
      
 70 
     | 
    
         
            +
                      end
         
     | 
| 
      
 71 
     | 
    
         
            +
                    end
         
     | 
| 
      
 72 
     | 
    
         
            +
                  end
         
     | 
| 
      
 73 
     | 
    
         
            +
                  stub_const("M", m)
         
     | 
| 
      
 74 
     | 
    
         
            +
                  expect(v.resolve_context("A", "M::N")).to be(m::N::A)
         
     | 
| 
      
 75 
     | 
    
         
            +
                end
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                it "swallows NameError" do
         
     | 
| 
      
 78 
     | 
    
         
            +
                  expect(v.resolve_context("String", "Foo::Bar")).to be(String)
         
     | 
| 
      
 79 
     | 
    
         
            +
                end
         
     | 
| 
      
 80 
     | 
    
         
            +
              end
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
      
 82 
     | 
    
         
            +
              context ".resolve_path_elems" do
         
     | 
| 
      
 83 
     | 
    
         
            +
                it "returns an array" do
         
     | 
| 
      
 84 
     | 
    
         
            +
                  expect(v.resolve_path_elems(["File", "Stat"])).to eq([File, File::Stat])
         
     | 
| 
      
 85 
     | 
    
         
            +
                end
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
                it "swallows NameError" do
         
     | 
| 
      
 88 
     | 
    
         
            +
                  expect(v.resolve_path_elems(["Foo", "Bar"])).to eq([])
         
     | 
| 
      
 89 
     | 
    
         
            +
                end
         
     | 
| 
      
 90 
     | 
    
         
            +
              end
         
     | 
| 
      
 91 
     | 
    
         
            +
            end
         
     | 
    
        data/spec/robe_spec.rb
    ADDED
    
    | 
         @@ -0,0 +1,51 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'robe-server'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'net/http'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            describe Robe do
         
     | 
| 
      
 6 
     | 
    
         
            +
              before do
         
     | 
| 
      
 7 
     | 
    
         
            +
                $stderr = File.new(IO::NULL, "w")
         
     | 
| 
      
 8 
     | 
    
         
            +
                Robe.start
         
     | 
| 
      
 9 
     | 
    
         
            +
              end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              after do
         
     | 
| 
      
 12 
     | 
    
         
            +
                Robe.stop if Robe.server
         
     | 
| 
      
 13 
     | 
    
         
            +
                $stderr = STDERR
         
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              it "has a server attribute" do
         
     | 
| 
      
 17 
     | 
    
         
            +
                expect(Robe.server).to be_a(Robe::Server)
         
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              it "has the server running" do
         
     | 
| 
      
 21 
     | 
    
         
            +
                expect(Robe.server.running).to be_true
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              it "has a stop method" do
         
     | 
| 
      
 25 
     | 
    
         
            +
                expect { Robe.stop }.to stop_it
         
     | 
| 
      
 26 
     | 
    
         
            +
              end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
              it "proxies 'ping' to Sash" do
         
     | 
| 
      
 29 
     | 
    
         
            +
                resp = Net::HTTP.get("127.0.0.1", "/ping", Robe.server.port)
         
     | 
| 
      
 30 
     | 
    
         
            +
                expect(resp).to eq("\"pong\"")
         
     | 
| 
      
 31 
     | 
    
         
            +
              end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
              it "returns 'robe on' when already running" do
         
     | 
| 
      
 34 
     | 
    
         
            +
                expect(Robe.start).to start_with("robe on")
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
              %w(INT TERM).each do |signal|
         
     | 
| 
      
 38 
     | 
    
         
            +
                it "shuts down on #{signal}" do
         
     | 
| 
      
 39 
     | 
    
         
            +
                  expect { Process.kill(signal, Process.pid) }.to stop_it
         
     | 
| 
      
 40 
     | 
    
         
            +
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
              end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
              RSpec::Matchers.define :stop_it do
         
     | 
| 
      
 44 
     | 
    
         
            +
                match do |proc|
         
     | 
| 
      
 45 
     | 
    
         
            +
                  server = Robe.server
         
     | 
| 
      
 46 
     | 
    
         
            +
                  proc.call
         
     | 
| 
      
 47 
     | 
    
         
            +
                  sleep 0.001
         
     | 
| 
      
 48 
     | 
    
         
            +
                  server.running == false
         
     | 
| 
      
 49 
     | 
    
         
            +
                end
         
     | 
| 
      
 50 
     | 
    
         
            +
              end
         
     | 
| 
      
 51 
     | 
    
         
            +
            end
         
     | 
    
        data/spec/spec_helper.rb
    ADDED
    
    | 
         @@ -0,0 +1,39 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'simplecov'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'coveralls'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'pry'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
         
     | 
| 
      
 6 
     | 
    
         
            +
              SimpleCov::Formatter::HTMLFormatter,
         
     | 
| 
      
 7 
     | 
    
         
            +
              Coveralls::SimpleCov::Formatter
         
     | 
| 
      
 8 
     | 
    
         
            +
            ]
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            SimpleCov.start
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            RSpec.configure do |config|
         
     | 
| 
      
 13 
     | 
    
         
            +
              config.expect_with :rspec do |c|
         
     | 
| 
      
 14 
     | 
    
         
            +
                c.syntax = :expect
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
            end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            module ScannerHelper
         
     | 
| 
      
 19 
     | 
    
         
            +
              def new_module(imethod, method, private_imethod, private_method)
         
     | 
| 
      
 20 
     | 
    
         
            +
                Module.new do
         
     | 
| 
      
 21 
     | 
    
         
            +
                  eval <<-EOS
         
     | 
| 
      
 22 
     | 
    
         
            +
                    def #{imethod}; end
         
     | 
| 
      
 23 
     | 
    
         
            +
                    private
         
     | 
| 
      
 24 
     | 
    
         
            +
                    def #{private_imethod}; end
         
     | 
| 
      
 25 
     | 
    
         
            +
                    class << self
         
     | 
| 
      
 26 
     | 
    
         
            +
                      def #{method}; end
         
     | 
| 
      
 27 
     | 
    
         
            +
                      private
         
     | 
| 
      
 28 
     | 
    
         
            +
                      def #{private_method}; end
         
     | 
| 
      
 29 
     | 
    
         
            +
                    end
         
     | 
| 
      
 30 
     | 
    
         
            +
                  EOS
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
              end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
              def named_module(name, *args)
         
     | 
| 
      
 35 
     | 
    
         
            +
                new_module(*args).tap do |m|
         
     | 
| 
      
 36 
     | 
    
         
            +
                  m.instance_eval "def __name__; \"#{name}\" end"
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
              end
         
     | 
| 
      
 39 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'robe/visor'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class ScopedVisor < Robe::Visor
         
     | 
| 
      
 4 
     | 
    
         
            +
              def initialize(*modules)
         
     | 
| 
      
 5 
     | 
    
         
            +
                if modules.last.is_a? Hash
         
     | 
| 
      
 6 
     | 
    
         
            +
                  @namespace = modules.pop
         
     | 
| 
      
 7 
     | 
    
         
            +
                else
         
     | 
| 
      
 8 
     | 
    
         
            +
                  @namespace = {}
         
     | 
| 
      
 9 
     | 
    
         
            +
                end
         
     | 
| 
      
 10 
     | 
    
         
            +
                @modules = modules + @namespace.values
         
     | 
| 
      
 11 
     | 
    
         
            +
              end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              def fits?(type, m)
         
     | 
| 
      
 14 
     | 
    
         
            +
                m.kind_of? type
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              def each_object(type)
         
     | 
| 
      
 18 
     | 
    
         
            +
                @modules.select { |m| fits?(type, m) }.each { |m| yield m if block_given? }
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
              def resolve_path_elems(nesting)
         
     | 
| 
      
 22 
     | 
    
         
            +
                base = @namespace[nesting.shift]
         
     | 
| 
      
 23 
     | 
    
         
            +
                [base] + super(nesting, base)
         
     | 
| 
      
 24 
     | 
    
         
            +
              end
         
     | 
| 
      
 25 
     | 
    
         
            +
            end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            class BlindVisor < ScopedVisor
         
     | 
| 
      
 28 
     | 
    
         
            +
              def fits?(type, m)
         
     | 
| 
      
 29 
     | 
    
         
            +
                true
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,116 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: robe-server
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.2
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Phil Hagelberg, Dmitry Gutov, Alexsey Ermolaev
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-09-24 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '10.3'
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '10.3'
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '2.14'
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '2.14'
         
     | 
| 
      
 41 
     | 
    
         
            +
            description: Server for robe
         
     | 
| 
      
 42 
     | 
    
         
            +
            email: afay.zangetsu@gmail.com
         
     | 
| 
      
 43 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 44 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 45 
     | 
    
         
            +
            extra_rdoc_files:
         
     | 
| 
      
 46 
     | 
    
         
            +
            - LICENSE
         
     | 
| 
      
 47 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 48 
     | 
    
         
            +
            files:
         
     | 
| 
      
 49 
     | 
    
         
            +
            - ".gitignore"
         
     | 
| 
      
 50 
     | 
    
         
            +
            - ".rspec"
         
     | 
| 
      
 51 
     | 
    
         
            +
            - ".travis.yml"
         
     | 
| 
      
 52 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 53 
     | 
    
         
            +
            - Gemfile.lock
         
     | 
| 
      
 54 
     | 
    
         
            +
            - LICENSE
         
     | 
| 
      
 55 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 56 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 57 
     | 
    
         
            +
            - lib/robe-server.rb
         
     | 
| 
      
 58 
     | 
    
         
            +
            - lib/robe/core_ext.rb
         
     | 
| 
      
 59 
     | 
    
         
            +
            - lib/robe/jvisor.rb
         
     | 
| 
      
 60 
     | 
    
         
            +
            - lib/robe/sash.rb
         
     | 
| 
      
 61 
     | 
    
         
            +
            - lib/robe/sash/doc_for.rb
         
     | 
| 
      
 62 
     | 
    
         
            +
            - lib/robe/sash/includes_tracker.rb
         
     | 
| 
      
 63 
     | 
    
         
            +
            - lib/robe/scanners.rb
         
     | 
| 
      
 64 
     | 
    
         
            +
            - lib/robe/server.rb
         
     | 
| 
      
 65 
     | 
    
         
            +
            - lib/robe/type_space.rb
         
     | 
| 
      
 66 
     | 
    
         
            +
            - lib/robe/visor.rb
         
     | 
| 
      
 67 
     | 
    
         
            +
            - robe-server.gemspec
         
     | 
| 
      
 68 
     | 
    
         
            +
            - spec/robe/jvisor_spec.rb
         
     | 
| 
      
 69 
     | 
    
         
            +
            - spec/robe/method_scanner_spec.rb
         
     | 
| 
      
 70 
     | 
    
         
            +
            - spec/robe/module_scanner_spec.rb
         
     | 
| 
      
 71 
     | 
    
         
            +
            - spec/robe/sash/doc_for_spec.rb
         
     | 
| 
      
 72 
     | 
    
         
            +
            - spec/robe/sash/includes_tracker_spec.rb
         
     | 
| 
      
 73 
     | 
    
         
            +
            - spec/robe/sash_spec.rb
         
     | 
| 
      
 74 
     | 
    
         
            +
            - spec/robe/server_spec.rb
         
     | 
| 
      
 75 
     | 
    
         
            +
            - spec/robe/type_space_spec.rb
         
     | 
| 
      
 76 
     | 
    
         
            +
            - spec/robe/visor_spec.rb
         
     | 
| 
      
 77 
     | 
    
         
            +
            - spec/robe_spec.rb
         
     | 
| 
      
 78 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     | 
| 
      
 79 
     | 
    
         
            +
            - spec/support/mocks.rb
         
     | 
| 
      
 80 
     | 
    
         
            +
            homepage: https://github.com/AfsmNGhr/robe-server
         
     | 
| 
      
 81 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 82 
     | 
    
         
            +
            - GPL-3.0
         
     | 
| 
      
 83 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 84 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 85 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 86 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 87 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 88 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 89 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 90 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 91 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 92 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 93 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 94 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 95 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 96 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 97 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 98 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 99 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 100 
     | 
    
         
            +
            rubygems_version: 2.5.1
         
     | 
| 
      
 101 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 102 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 103 
     | 
    
         
            +
            summary: Code navigation, documentation lookup and completion for Ruby
         
     | 
| 
      
 104 
     | 
    
         
            +
            test_files:
         
     | 
| 
      
 105 
     | 
    
         
            +
            - spec/robe/jvisor_spec.rb
         
     | 
| 
      
 106 
     | 
    
         
            +
            - spec/robe/method_scanner_spec.rb
         
     | 
| 
      
 107 
     | 
    
         
            +
            - spec/robe/module_scanner_spec.rb
         
     | 
| 
      
 108 
     | 
    
         
            +
            - spec/robe/sash/doc_for_spec.rb
         
     | 
| 
      
 109 
     | 
    
         
            +
            - spec/robe/sash/includes_tracker_spec.rb
         
     | 
| 
      
 110 
     | 
    
         
            +
            - spec/robe/sash_spec.rb
         
     | 
| 
      
 111 
     | 
    
         
            +
            - spec/robe/server_spec.rb
         
     | 
| 
      
 112 
     | 
    
         
            +
            - spec/robe/type_space_spec.rb
         
     | 
| 
      
 113 
     | 
    
         
            +
            - spec/robe/visor_spec.rb
         
     | 
| 
      
 114 
     | 
    
         
            +
            - spec/robe_spec.rb
         
     | 
| 
      
 115 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     | 
| 
      
 116 
     | 
    
         
            +
            - spec/support/mocks.rb
         
     |