Fix errors in "edit_spec.rb" and "editor_spec.rb"

Basically, the condition was a bit wrong. Let's hope this commit fixes
it.
This commit is contained in:
Kyrylo Silin 2013-01-14 18:43:19 +02:00
parent 08474961cc
commit 92a1b86e1e
2 changed files with 6 additions and 6 deletions

View File

@ -21,10 +21,10 @@ describe "edit" do
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
# something "Temp".
@tf_dir =
if Pry::Helpers::BaseHelpers.rbx? || Pry::Helpers::BaseHelpers.jruby?
Pathname.new(Dir.tmpdir)
else
if Pry::Helpers::BaseHelpers.mri_19?
Pathname.new(Dir::Tmpname.tmpdir)
else
Pathname.new(Dir.tmpdir)
end
@tf_path = File.expand_path(File.join(@tf_dir.to_s, 'bar.rb'))

View File

@ -10,10 +10,10 @@ describe Pry::Editor do
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
# something "Temp".
@tf_dir =
if Pry::Helpers::BaseHelpers.rbx? || Pry::Helpers::BaseHelpers.jruby?
Pathname.new(Dir.tmpdir)
else
if Pry::Helpers::BaseHelpers.mri_19?
Pathname.new(Dir::Tmpname.tmpdir)
else
Pathname.new(Dir.tmpdir)
end
@tf_path = File.join(@tf_dir.to_s, 'hello world.rb')