Skip to content

Commit

Permalink
Add spec for Clipboard::Java
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Apr 5, 2024
1 parent 45a7ff7 commit 327853e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/clipboard_java_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# frozen_string_literal: true

require_relative "spec_helper"

if RUBY_ENGINE === "jruby"
require 'clipboard/java'

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

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

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

0 comments on commit 327853e

Please sign in to comment.