{"push_id":667144916,"size":1,"distinct_size":0,"ref":"refs/heads/deployed-to-preview","head":"4eea66df1c53d5b45a0ee5e0cc78a3065a3ee0f3","before":"3477edb5690f521dac8c5f6212771dfb2f10112d","commits":[{"sha":"4eea66df1c53d5b45a0ee5e0cc78a3065a3ee0f3","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Avoid order-dependent test failure in TranslatorLinks\n\nI was seeing a bunch of tests fail in the following two integration tests:\n\n* `test/integration/smart_answer_flows/register_a_birth_test.rb`\n* `test/integration/smart_answer_flows/register_a_death_test.rb`\n\nI tracked the problem down to the fact that the following unit test was running\n**before** these two integration tests and the stubbed version of the `Hash`\nwas being memo-ised in a class instance variable within the following method:\n\n`SmartAnswer::Calculators::TranslatorLinks.translator_links`\n\nI was able to reproduce the failures using the following command:\n\n    bundle exec ruby -I\"lib:test\" -I\".bundle/gems/gems/rake-10.4.2/lib\" \".bundle/gems/gems/rake-10.4.2/lib/rake/rake_test_loader.rb\" \"test/unit/calculators/translator_links_test.rb\" \"test/integration/smart_answer_flows/register_a_birth_test.rb\" --seed=27340 --verbose\n\nMy fix is to stop memo-ising the `Hash`. I don't think this will lead to any\nsignificant performance problems, because the YAML file isn't very big and in\nany case, it will only be loaded once per __instance__ of the `TranslatorLinks`\nclass.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/4eea66df1c53d5b45a0ee5e0cc78a3065a3ee0f3"}]}