Skip to content

Commit

Permalink
Remove asserting return value of copy method in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Apr 6, 2024
1 parent fe24627 commit b5efff2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions spec/clipboard_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
end

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

it "can clear" do
expect( Clipboard.copy('xxx') ).to eq true
Clipboard.copy('xxx')
expect( Clipboard.paste ).to eq 'xxx'
Clipboard.clear
expect( Clipboard.paste ).to eq ''
Expand Down
4 changes: 2 additions & 2 deletions spec/clipboard_java_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
end

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

it "can clear" do
expect( Clipboard.copy('example') ).to eq true
Clipboard.copy('example')
expect( Clipboard.paste ).to eq 'example'
Clipboard.clear
expect( Clipboard.paste ).to eq ''
Expand Down
4 changes: 2 additions & 2 deletions spec/clipboard_linux_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
end

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

it "can clear" do
expect( Clipboard.copy('example') ).to eq true
Clipboard.copy('example')
expect( Clipboard.paste ).to eq 'example'
Clipboard.clear
expect( Clipboard.paste ).to eq ''
Expand Down
4 changes: 2 additions & 2 deletions spec/clipboard_mac_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
end

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

it "can clear" do
expect( Clipboard.copy('example') ).to eq true
Clipboard.copy('example')
expect( Clipboard.paste ).to eq 'example'
Clipboard.clear
expect( Clipboard.paste ).to eq ''
Expand Down
4 changes: 2 additions & 2 deletions spec/clipboard_windows_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
end

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

it "can clear" do
expect( Clipboard.copy('example') ).to eq true
Clipboard.copy('example')
expect( Clipboard.paste ).to eq 'example'.encode("UTF-16LE")
Clipboard.clear
expect( Clipboard.paste ).to eq ''
Expand Down

0 comments on commit b5efff2

Please sign in to comment.