diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..4fd9863a23 --- /dev/null +++ b/appveyor.yml @@ -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' + diff --git a/lib/rspec/core/configuration.rb b/lib/rspec/core/configuration.rb index dcf59c7a6a..bc30e8d21a 100644 --- a/lib/rspec/core/configuration.rb +++ b/lib/rspec/core/configuration.rb @@ -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? diff --git a/spec/rspec/core/configuration_spec.rb b/spec/rspec/core/configuration_spec.rb index a5357f6276..cded1676bc 100644 --- a/spec/rspec/core/configuration_spec.rb +++ b/spec/rspec/core/configuration_spec.rb @@ -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 ], @@ -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 diff --git a/spec/support/shared_example_groups.rb b/spec/support/shared_example_groups.rb index 5751babf60..4a732c1baa 100644 --- a/spec/support/shared_example_groups.rb +++ b/spec/support/shared_example_groups.rb @@ -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