Skip to content

Commit e21e6f9

Browse files
committed
Update tests / CI
1 parent 1ca3b8a commit e21e6f9

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/ruby.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,11 @@ jobs:
2222

2323
- name: Setup extension
2424
working-directory: ./ext/erbx
25-
run: ruby extconf.rb
25+
run: bundle install
2626

2727
- name: Build extension
2828
working-directory: ./ext/erbx
29-
run: make
29+
run: bundle exec rake
3030

3131
- name: Test extension
32-
working-directory: ./ext/erbx
33-
run: ruby test.rb
34-
35-
- name: Ruby tests
36-
run: rake test
32+
run: bundle exec ruby ext/erbx/test.rb

ext/erbx/test.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
require "./erbx"
1+
# frozen_string_literal: true
2+
3+
$LOAD_PATH.unshift File.expand_path('../../lib', __dir__)
4+
5+
require "erbx"
26

37
ERBX.lex("<html><html>")

ext/erbx/test/lexer_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
class LexerTest < Minitest::Test
66
def test_lexer
7-
assert_equal "test", ERBX.lex("<html></html>")
7+
refute_nil ERBX.lex("<html></html>")
88
end
99
end

ext/erbx/test/test_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
require_relative "../erbx"
1+
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
2+
3+
require "erbx"
24
require "maxitest/autorun"

0 commit comments

Comments
 (0)