features: Update the way we access Minitest assertions

Per https://github.com/cucumber/cucumber/wiki/Using-MiniTest.
This commit is contained in:
Parker Moore 2015-04-20 10:53:53 -07:00
parent e93e49c269
commit 6597bacee8
2 changed files with 13 additions and 2 deletions

View File

@ -27,7 +27,9 @@ After do
Dir.chdir(File.dirname(TEST_DIR))
end
World(Minitest::Assertions)
World do
MinitestWorld.new
end
Given /^I have a blank site in "(.*)"$/ do |path|
FileUtils.mkdir_p(path) unless File.exist?(path)

View File

@ -1,8 +1,17 @@
require 'fileutils'
require 'posix-spawn'
require 'minitest/assertions'
require 'minitest/spec'
require 'time'
class MinitestWorld
extend Minitest::Assertions
attr_accessor :assertions
def initialize
self.assertions = 0
end
end
JEKYLL_SOURCE_DIR = File.dirname(File.dirname(File.dirname(__FILE__)))
TEST_DIR = File.expand_path(File.join('..', '..', 'tmp', 'jekyll'), File.dirname(__FILE__))
JEKYLL_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jekyll'))