Skip to content

Commit 12c9d00

Browse files
authored
Detect missing fixtures submodule (#2105)
* Detect missing Prism fixtures submodule * Remove unnecessary extra check
1 parent 2e0f748 commit 12c9d00

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

bin/test

-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
#!/usr/bin/env bash
22

3-
PRISM_FIXTURES_DIR=test/fixtures/prism/test/prism/fixtures
4-
5-
if [ ! -d "$PRISM_FIXTURES_DIR" ]; then
6-
echo "$PRISM_FIXTURES_DIR does not exist."
7-
echo "Please run 'git submodule update --init' to pull submodule fixtures."
8-
exit 1
9-
fi
10-
113
if [[ 2 -eq $# ]]; then
124
bundle exec rake TEST="$1" TESTOPTS="-n='/$2/'"
135
elif [[ 1 -eq $# ]]; then

lib/ruby_indexer/test/index_test.rb

+4
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ def baz; end
299299
end
300300

301301
def test_indexing_prism_fixtures_succeeds
302+
unless Dir.exist?("test/fixtures/prism/test/prism/fixtures")
303+
raise "Prism fixtures not found. Run `git submodule update --init` to fetch them."
304+
end
305+
302306
fixtures = Dir.glob("test/fixtures/prism/test/prism/fixtures/**/*.txt")
303307

304308
fixtures.each do |fixture|

0 commit comments

Comments
 (0)