Sha256: 8d1cf6aefdf74a80fe6d98c0fa4f02bde18180d840cbdf432852d352074dee65

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: true

require_relative "spec_helper"

describe 'Clipboard::File' do
  before :all do
    Clipboard.implementation = Clipboard::File
    cache = Clipboard::File::FILE
    FileUtils.rm cache if File.exist?(cache)
  end

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clipboard-1.3.5 spec/clipboard_file_spec.rb
clipboard-1.3.4 spec/clipboard_file_spec.rb