Sha256: 09146a7a7600dd993439516d4154b61f449b516dffd26303f5894737b856b556

Contents?: true

Size: 702 Bytes

Versions: 47

Compression:

Stored size: 702 Bytes

Contents

require 'spec_helper'

module RSpec
  module Core
    describe RubyProject do

      describe "#determine_root" do

        context "with ancestor containing spec directory" do
          it "returns ancestor containing the spec directory" do
            RubyProject.stub(:ascend_until).and_return('foodir')
            expect(RubyProject.determine_root).to eq("foodir")
          end
        end

        context "without ancestor containing spec directory" do
          it "returns current working directory" do
            RubyProject.stub(:find_first_parent_containing).and_return(nil)
            expect(RubyProject.determine_root).to eq(".")
          end
        end

      end
    end
  end
end

Version data entries

47 entries across 47 versions & 12 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/spec/rspec/core/ruby_project_spec.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/spec/rspec/core/ruby_project_spec.rb
rspec-core-2.99.2 spec/rspec/core/ruby_project_spec.rb
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
rspec-core-2.99.1 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.99.0 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.99.0.rc1 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.8 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.99.0.beta2 spec/rspec/core/ruby_project_spec.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
dxruby_rp5-0.0.3 spec/vendor/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb