Pārlūkot izejas kodu

Made crystal spec tests run the code

master
Ludovic 'Archivist' Lagouardette pirms 5 gadiem
vecāks
revīzija
7ae828e182
2 mainītis faili ar 11 papildinājumiem un 6 dzēšanām
  1. +5
    -4
      spec/andrew_spec.cr
  2. +6
    -2
      src/andrew.cr

+ 5
- 4
spec/andrew_spec.cr Parādīt failu

@ -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 Parādīt failu

@ -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

Notiek ielāde…
Atcelt
Saglabāt