-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate exercises using x-common #20
Comments
I wrote this last night to create a specs from x-common. @cases = [cases, from, x-common]
File.open("spec.cr", "w+") do |f|
@cases.each do |c|
f.puts %/it "#{c[:description]}" do/
f.puts %/ Series.new("#{c[:digits]}").largest_product(#{c[:span]}).should eq #{c[:expected]}/
f.puts "end"
end
end |
@elorest , Nice! Something like this could probably be expanded to make specs for every exercise's json file in the x-common repo. |
My thoughts as well. I'll work on that when I have a chance. I just put in On Jul 21, 2016 9:48 PM, "Max Helmetag" notifications@github.com wrote:
|
Looks like |
I feel like the test metadata (json files) in |
Yeah, we haven't really figured out what to standardize on, and any thoughts about how to do that are very welcome. If you have thoughts about it, would you mind opening something in the x-common repository?
Sweet! There's some talk about improving the Ruby generators, too. exercism/ruby#396 (comment) If several people are thinking about this at once, it could be worth starting a discussion in the github.com/exercism/discussions/issues repo. |
@bmulvihill has ported over a spec generator similar to the one in xruby 🎊 so now we can make test case templates like they do! One thing I will work on adding is getting the json from x-common over http or local file system (so that there's a choice). |
Looks like this track is about to be launched soon (with almost 9 exercises now).
I think we should generate all exercises from x-common. I see a lot of PRs in x-ruby changing the static exercise files to dynamically generated ones. Using it from the start in a new repo like this is better instead of converting them later.
Not sure if this should be enforced on all PRs. What are your views regarding this?
The text was updated successfully, but these errors were encountered: