Преглед на файлове

Made crystal spec tests run the code

master
Ludovic 'Archivist' Lagouardette преди 4 години
родител
ревизия
7ae828e182
променени са 2 файла, в които са добавени 11 реда и са изтрити 6 реда
  1. +5
    -4
      spec/andrew_spec.cr
  2. +6
    -2
      src/andrew.cr

+ 5
- 4
spec/andrew_spec.cr Целия файл

@ -1,9 +1,10 @@
require "./spec_helper"
describe Andrew do
# TODO: Write tests
it "works" do
false.should eq(true)
it "generate record.yml" do
File.open("tests/record.yml") do |file|
fg = FileGenerator.from_yaml(file)
end
true.should eq(true)
end
end

+ 6
- 2
src/andrew.cr Целия файл

@ -128,6 +128,10 @@ class AttributeAfterGenerator
end
end
File.open(ARGV[0]) do |file|
puts FileGenerator.from_yaml(file).to_s
if(ARGV.size != 0)
File.open(ARGV[0]) do |file|
puts FileGenerator.from_yaml(file).to_s
end
else
puts "Andrew code generator\n\tExpects a single YAML file as argument"
end

Зареждане…
Отказ
Запис