Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ce1ec97e8326
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4f3ce719fb04
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jul 2, 2015

  1. Copy the full SHA
    00a19f4 View commit details
  2. Copy the full SHA
    4f3ce71 View commit details
Showing with 15 additions and 8 deletions.
  1. +15 −8 spec/ruby/core/file/socket_spec.rb
23 changes: 15 additions & 8 deletions spec/ruby/core/file/socket_spec.rb
Original file line number Diff line number Diff line change
@@ -19,15 +19,22 @@

rm_r filename
end
end

describe "File.socket?" do
before :each do
# We need a really short name here.
# on Linux the path length is limited to 107, see unix(7).
@name = tmp("s")
@server = UNIXServer.new @name
end

after :each do
@server.close
rm_r @name
end

it "returns true if the file is a socket" do
filename = tmp("i_am_a_socket")
server = UNIXServer.new filename
begin
File.socket?(filename).should == true
ensure
server.close
rm_r filename
end
File.socket?(@name).should == true
end
end