From 1d369aada31e64ad4ffff2ac2ac71c86b117d9dd Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 18 Jan 2016 12:48:12 -0800 Subject: [PATCH] features: some under-the-hood enhancements --- features/step_definitions.rb | 6 ++---- features/support/helpers.rb | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/features/step_definitions.rb b/features/step_definitions.rb index 151009a6..a6790a15 100644 --- a/features/step_definitions.rb +++ b/features/step_definitions.rb @@ -105,10 +105,8 @@ end # Given %r{^I have a configuration file with:$} do |table| - File.open("_config.yml", "w") do |f| - table.hashes.each do |row| - f.write("#{row["key"]}: #{row["value"]}\n") - end + table.hashes.each do |row| + step %(I have a configuration file with "#{row["key"]}" set to "#{row["value"]}") end end diff --git a/features/support/helpers.rb b/features/support/helpers.rb index 83010b9e..d65695ce 100644 --- a/features/support/helpers.rb +++ b/features/support/helpers.rb @@ -2,6 +2,7 @@ require "fileutils" require "jekyll/utils" require "open3" require "time" +require "safe_yaml/load" class Paths SOURCE_DIR = Pathname.new(File.expand_path("../..", __dir__))