Sha256: 96feb41e31d9e7e942c8150af23588034675f53ee7143c355213831ae35d92a0
Contents?: true
Size: 1.61 KB
Versions: 5
Compression:
Stored size: 1.61 KB
Contents
$LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '../lib'))) ENV['RACK_ENV'] = 'test' ENV['CHECKCHECKIT_URL'] = 'http://example.com' require 'vault-test-tools' require 'minitest/mock' require 'fakefs' require 'checkcheckit' require 'rr' module Examples def self.create_grocery_list(home) dir = File.join(home, 'personal') FileUtils.mkdir_p(dir) File.open(File.join(dir, 'groceries'), 'w') do |file| file << "# These be the groceries\n" file << "- pineapple \n" file << "- mangoes \n enhance the flavor with \n spice\n" file << "- fudge \n best from a place in sutter creek" end end end module ConsoleTestHelpers # Internal: Runs command lines in tests like their command line invocation. # # Examples: # # # check 'list' # # # check 'list deploy' # # # check 'start deploy' def check(cmd_string) console.run! cmd_string.split(' ') end def reset_console ## Clear out the output @console = nil end def console @console ||= CheckCheckIt::Console.new(out_stream: StringIO.new) end def output console.out_stream.string end def home console.list_dir || '~/checkcheckit' end def setup super reset_console FakeFS.activate! Excon.defaults[:mock] = true end def teardown super FakeFS.deactivate! Excon.stubs.clear end end CheckCheckIt::TestCase = Class.new(Vault::TestCase) CheckCheckIt::Spec = Class.new(Vault::Spec) MiniTest::Spec.register_spec_type //, CheckCheckIt::Spec Vault::Test.include_in_all Vault::Test::EnvironmentHelpers, ConsoleTestHelpers, RR::Adapters::TestUnit
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
checkcheckit-0.5.0 | test/helper.rb |
checkcheckit-0.4.0 | test/helper.rb |
checkcheckit-0.3.1 | test/helper.rb |
checkcheckit-0.3.0 | test/helper.rb |
checkcheckit-0.2.1 | test/helper.rb |