Welcome to mirror list, hosted at ThFree Co, Russian Federation.

command_test_case.rb « test - github.com/mapsme/twine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 64578079b85f0cd487c234d9c9c3030ff9f321d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'twine_test_case'

class CommandTestCase < TwineTestCase
  def prepare_mock_formatter(formatter_class)
    twine_file = Twine::TwineFile.new
    twine_file.language_codes.concat KNOWN_LANGUAGES

    formatter = formatter_class.new
    formatter.twine_file = twine_file
    Twine::Formatters.formatters.clear
    Twine::Formatters.formatters << formatter
    formatter
  end
end