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
tuktuk-rails-0.0.10 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
tuktuk-rails-0.0.9 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
tuktuk-rails-0.0.8 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
tuktuk-rails-0.0.7 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
dxruby_rp5-0.0.2 spec/vendor/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
dxruby_rp5-0.0.1 spec/vendor/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb
rspec-core-3.0.0.beta1 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.99.0.beta1 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.7 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.6 spec/rspec/core/ruby_project_spec.rb
clickable_link-0.0.2 vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.5/spec/rspec/core/ruby_project_spec.rb
syllable_counter-1.0.0 vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.5 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.4 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.3 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.2 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.1 spec/rspec/core/ruby_project_spec.rb
rspec-core-2.14.0 spec/rspec/core/ruby_project_spec.rb
sshp-0.0.2 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/ruby_project_spec.rb