Skip to content

Commit

Permalink
Add basic build test
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlacan committed May 24, 2024
1 parent 368c187 commit 589a091
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ gem "middleman-syntax"
gem "middleman-gh-pages"
gem "redcarpet"
gem "standard", "~> 1.35"

group :development, :test do
gem "minitest"
end
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ DEPENDENCIES
middleman-livereload
middleman-minify-html
middleman-syntax
minitest
redcarpet
standard (~> 1.35)

Expand Down
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@ task :clean do
puts "Cleaning build/ directory"
system("rm -rf build/")
end

require "minitest/test_task"

Minitest::TestTask.create(:test) do |t|
t.libs << "test"
# t.libs << "lib"
t.warning = false
t.test_globs = ["test/*_test.rb"]
end

task :default => :test
11 changes: 11 additions & 0 deletions test/build_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require "minitest/autorun"

class TestMeme < Minitest::Test
def setup
@output = `bin/rake build`
end

def test_build
assert @output.include?("Project built successfully.")
end
end

0 comments on commit 589a091

Please sign in to comment.