Code Monkey home page Code Monkey logo

Comments (7)

elorest avatar elorest commented on August 26, 2024

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

from crystal.

mhelmetag avatar mhelmetag commented on August 26, 2024

@elorest , Nice! Something like this could probably be expanded to make specs for every exercise's json file in the x-common repo.

from crystal.

elorest avatar elorest commented on August 26, 2024

My thoughts as well. I'll work on that when I have a chance. I just put in
2 weeks at my work so I'm swamped trying to finish up a million things so
I don't leave them in a pinch.

On Jul 21, 2016 9:48 PM, "Max Helmetag" [email protected] wrote:

@elorest https://github.com/elorest , something like this could
probably be expanded to make specs for every exercise's json file in the
x-common repo.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#20 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHmpHBp1W7JA9KM5RxPpJRoDyeusN1Rks5qYD2OgaJpZM4JRfqe
.

from crystal.

tejasbubane avatar tejasbubane commented on August 26, 2024

Looks like xruby also uses some kind of common generator. We can follow the same architecture as described in xruby's generated section.

from crystal.

mhelmetag avatar mhelmetag commented on August 26, 2024

I feel like the test metadata (json files) in x-common need to be standardized with description, input and expected. Currently there are some files that are kind of all over the place... but I am making some progress with a generator that pulls directly from the github repo online.

from crystal.

kytrinyx avatar kytrinyx commented on August 26, 2024

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?

I am making some progress with a generator that pulls directly from the github repo online.

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.

from crystal.

mhelmetag avatar mhelmetag commented on August 26, 2024

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

from crystal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.