Sha256: 206eb74d6ad9faf6f37b369f3c3a2a355ef1f9fd8446fb95ad62a70ab2435fc4

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

require_relative "spec_helper"

require "rbconfig"

if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
  require 'clipboard/windows'

  describe "Clipboard::Windows" do
    before :all do
      Clipboard.implementation = Clipboard::Windows
    end

    it "can copy & paste" do
      Clipboard.copy('123windows')
      expect( Clipboard.paste ).to eq '123windows'.encode("UTF-16LE")
    end

    it "can clear" do
      Clipboard.copy('123windows')
      expect( Clipboard.paste ).to eq '123windows'.encode("UTF-16LE")
      Clipboard.clear
      expect( Clipboard.paste ).to eq ''
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
clipboard-2.0.0 spec/clipboard_windows_spec.rb