Sha256: fadc89e433fb6e9dc867a9cfc33a70782cb40942d0e336fc904f1ce7d30c117b

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

# frozen_string_literal: true

require_relative "spec_helper"

require 'clipboard/file'
require "fileutils"

describe 'Clipboard::File' do
  before :all do
    Clipboard.implementation = Clipboard::File
    cache = Clipboard::File::FILE
    FileUtils.rm_f cache
  end

  it "can paste with empty file" do
    expect( Clipboard.paste ).to eq ''
  end

  it "can copy & paste" do
    Clipboard.copy('123file')
    expect( Clipboard.paste ).to eq '123file'
  end

  it "can clear" do
    Clipboard.copy('123file')
    expect( Clipboard.paste ).to eq '123file'
    Clipboard.clear
    expect( Clipboard.paste ).to eq ''
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
clipboard-2.0.0 spec/clipboard_file_spec.rb