Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #1648

Merged
merged 4 commits into from
Sep 11, 2023
Merged

Fix CI #1648

Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion spec/tapioca/cli/annotations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AnnotationsTest < SpecWithProject
OUT

assert_success_status(result)
refute(File.directory?(@project.absolute_path("sorbet/rbi/annotations")))
refute(File.directory?(@project.absolute_path_to("sorbet/rbi/annotations")))

repo.destroy!
end
Expand Down
6 changes: 3 additions & 3 deletions spec/tapioca/cli/dsl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def self.application
end

it "must generate a .gitattributes file in the output folder" do
@project.write("lib/post.rb", <<~RB)
@project.write!("lib/post.rb", <<~RB)
require "smart_properties"

class Post
Expand All @@ -91,7 +91,7 @@ class Post
**/*.rbi linguist-generated=true
CONTENT
ensure
@project.remove("output")
@project.remove!("output")
end

it "must not generate a .gitattributes file if the output folder is not created" do
Expand All @@ -103,7 +103,7 @@ class Post
ERR
refute_project_file_exist("output/.gitattributes")
ensure
@project.remove("output")
@project.remove!("output")
end

it "respects the Gemfile and Gemfile.lock" do
Expand Down
14 changes: 7 additions & 7 deletions spec/tapioca/cli/gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ class << self

it "must generate a .gitattributes file in the output folder" do
foo = mock_gem("foo", "0.0.1") do
write("lib/foo.rb", FOO_RB)
write!("lib/foo.rb", FOO_RB)
end

@project.require_mock_gem(foo)
@project.bundle_install
@project.bundle_install!
result = @project.tapioca("gem foo --outdir output")

assert_stdout_includes(result, <<~OUT)
Expand All @@ -244,16 +244,16 @@ class << self
**/*.rbi linguist-generated=true
CONTENT
ensure
@project.remove("output")
@project.remove!("output")
end

it "must not generate a .gitattributes file if the output folder is not created" do
foo = mock_gem("foo", "0.0.1") do
write("lib/foo.rb", FOO_RB)
write!("lib/foo.rb", FOO_RB)
end

@project.require_mock_gem(foo)
@project.bundle_install
@project.bundle_install!

# Generate for `foo` but exclude it as well, so that we don't create the output folder
result = @project.tapioca("gem foo --outdir output --exclude foo")
Expand All @@ -267,7 +267,7 @@ class << self

refute_project_file_exist("output/.gitattributes")
ensure
@project.remove("output")
@project.remove!("output")
end

it "must generate a single gem RBI" do
Expand Down Expand Up @@ -1695,7 +1695,7 @@ def baz; end
**/*.rbi linguist-generated=true
CONTENT
ensure
@project.remove("output")
@project.remove!("output")
end

it "must perform no operations if everything is up-to-date" do
Expand Down
Loading