Sha256: 5c21702683624c7528aa59c01d6cc5dbc46d7a68acb1e9ce28b10a640f24e543
Contents?: true
Size: 788 Bytes
Versions: 12
Compression:
Stored size: 788 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' module Synvert describe Snippet do let(:snippets_path) { File.join(File.dirname(__FILE__), '.synvert-ruby') } let(:snippet) { Snippet.new(snippets_path) } after { FileUtils.rmdir(snippets_path) if File.exist?(snippets_path) } describe 'sync' do it 'git clones snippets' do expect(Kernel).to receive(:system).with( "git clone https://github.com/xinminlabs/synvert-snippets-ruby.git #{snippets_path}" ) snippet.sync end it 'git pull snippets' do FileUtils.mkdir snippets_path expect(Kernel).to receive(:system).with('git checkout . && git pull --rebase') snippet.sync FileUtils.cd File.dirname(__FILE__) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems