Skip to content

Commit

Permalink
Move test path
Browse files Browse the repository at this point in the history
  • Loading branch information
ksss committed Oct 31, 2023
1 parent f476022 commit b60a5a4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test/type_struct_test.rb → lib/type_struct_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ def test_s_from_hash_with_array_of(t)
a.from_hash(a: 1, b: 'a')
rescue TypeStruct::MultiTypeError => e
[
%r{test/type_struct_test.rb:#{line}:in TypeError.*?#a expect ArrayOf\(Integer\) got 1}o,
%r{test/type_struct_test.rb:#{line}:in TypeError.*?#b expect Integer got "a"}o,
%r{lib/type_struct_test.rb:#{line}:in TypeError.*?#a expect ArrayOf\(Integer\) got 1}o,
%r{lib/type_struct_test.rb:#{line}:in TypeError.*?#b expect Integer got "a"}o,
].each do |expect|
unless expect =~ e.message
t.error("message was changed: #{e.message}")
Expand Down
7 changes: 6 additions & 1 deletion type_struct.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/ksss/type_struct"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{_test.rb}) }
spec.files = Dir.chdir(File.expand_path(__dir__)) do
[
%w[LICENSE.txt README.md],
Dir.glob("lib/**/*.*").grep_v(/_test\.rb\z/),
].flatten
end
spec.require_paths = ["lib"]
end

0 comments on commit b60a5a4

Please sign in to comment.