Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "{build}"

branches:
only:
- master

build: off

install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- gem install bundler
- bundler --version
- bundle install
- cinst ansicon

test_script:
- bundle exec rspec

environment:
matrix:
- ruby_version: '193'
- ruby_version: '21'

2 changes: 1 addition & 1 deletion lib/rspec/core/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ def get_files_to_run(paths)

def paths_to_check(paths)
return paths if pattern_might_load_specs_from_vendored_dirs?
paths + ['.']
paths + [Dir.getwd]
end

def pattern_might_load_specs_from_vendored_dirs?
Expand Down
6 changes: 4 additions & 2 deletions spec/rspec/core/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,11 @@ def loaded_files
end

def specify_consistent_ordering_of_files_to_run
allow(File).to receive(:directory?).and_call_original
allow(File).to receive(:directory?).with('a') { true }
allow(File).to receive(:directory?).with('.') { true }
globbed_files = nil
allow(Dir).to receive(:[]).with(/^\{?a/) { globbed_files }
allow(Dir).to receive(:[]).with(/^\{?\./) { [] }
allow(Dir).to receive(:[]).with(a_string_starting_with(Dir.getwd)) { [] }

orderings = [
%w[ a/1.rb a/2.rb a/3.rb ],
Expand Down Expand Up @@ -1036,6 +1036,8 @@ def metadata_hash(*args)
end

context "with ANSICON NOT available" do
around { |e| without_env_vars('ANSICON', &e) }

before do
allow_warning
end
Expand Down
4 changes: 4 additions & 0 deletions spec/support/shared_example_groups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
include_context "isolated directory"
let(:project_dir) { Dir.getwd }

before(:example) do
pending "Windows does not support symlinking"
end if RSpec::Support::OS.windows?

it "finds the files" do
foos_dir = File.join(project_dir, "spec/foos")
FileUtils.mkdir_p foos_dir
Expand Down