Skip to content
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

Feature offline tests #55

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Feature offline tests #55

wants to merge 5 commits into from

Conversation

flbulgarelli
Copy link
Member

Run the following code after running migrations:

Exercise.where(language: Language.for_name('gobstones')).each do |exercise|
  next unless exercise.test
  
  test = YAML.load(exercise.test)
  next unless test['examples']

  examples = test['examples'].map do |example|
    { 
      initialBoard: example['initial_board'], 
      expectedBoard: example['final_board'] 
    }
  end

  exercise.update! offline_test: {examples: examples}
end

@luchotc
Copy link
Contributor

luchotc commented Jan 6, 2020

@flbulgarelli IYO, what's missing for this one to be ready to review?

@flbulgarelli
Copy link
Member Author

It is ready! But we should decide wether we want this feature

@flbulgarelli flbulgarelli marked this pull request as ready for review January 7, 2020 14:06
@flbulgarelli flbulgarelli requested a review from luchotc January 7, 2020 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants