-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e599e20
commit ff77682
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
module Protoboeuf | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# frozen_string_literal: true | ||
|
||
require "helper" | ||
|
||
class GemTest < ProtoBoeuf::Test | ||
def test_can_be_required | ||
Tempfile.create do |file| | ||
file.write(<<~RUBY) | ||
require "bundler/inline" | ||
gemfile do | ||
gem "protoboeuf", path: "#{__dir__}/..", require: true | ||
end | ||
::ProtoBoeuf | ||
require "protoboeuf/codegen" | ||
::ProtoBoeuf::CodeGen | ||
exit 0 | ||
RUBY | ||
|
||
file.flush | ||
|
||
assert(system(RbConfig.ruby, "-v", file.path), "Failed to require the gem") | ||
end | ||
end | ||
end |