Hi,
I getting the expand path problem when trying to run some rspec
examples.
Ben Hall mentioned it before. http://www.ruby-forum.com/topic/167568#new
I have a spec:
-----------------------------------------------------------------------------
require File.dirname(__FILE__) + ''/Domain.dll''
require ''rubygems''
require ''spec''
module ProductSpecHelper
def valid_attributes
{ :Name => ''Test'' }
end
end
describe Domain::Product, "When saving" do
include ProductSpecHelper
before(:each) do
@product = Domain::Product.new
end
it "should have a name" do
@product.attributes = @valid_attributes
@product.name.should_not be_nil
end
it "should have product lines"
end
and run:
-----------------------------------------------------------------------------
D:\IronRuby\RSpec>ir product_spec.rb
c:\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\FileOps
.cs:522:in `ExpandPath'': Invalid argument - product_spec.rb:0
(Errno::EINVAL)
from :0:in `expand_path''
from example_group_methods.rb:108:in `set_description''
from example_group_methods.rb:171:in `subclass''
from example_group_methods.rb:48:in `describe''
from example_group_factory.rb:25:in `create_example_group''
from main.rb:22:in `describe''
from product_spec.rb:0
Is there a work around people are using at the moment?
Cheers.
--
Posted via http://www.ruby-forum.com/.
Or would anyone like to contribute a better implementation of expand_path? We
know the current one is wrong and needs to rewritten. This is an ideal
opportunity (not only) for first time contributors - it''s an isolated
piece of code, easy testable and you''ll actually help to fix something
others care about!
Contribute today! :)
http://wiki.github.com/ironruby/ironruby
Tomas
-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Michael Delaney
Sent: Friday, March 27, 2009 6:50 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] expand_path & Rspec
Hi,
I getting the expand path problem when trying to run some rspec
examples.
Ben Hall mentioned it before. http://www.ruby-forum.com/topic/167568#new
I have a spec:
-----------------------------------------------------------------------------
require File.dirname(__FILE__) + ''/Domain.dll''
require ''rubygems''
require ''spec''
module ProductSpecHelper
def valid_attributes
{ :Name => ''Test'' }
end
end
describe Domain::Product, "When saving" do
include ProductSpecHelper
before(:each) do
@product = Domain::Product.new
end
it "should have a name" do
@product.attributes = @valid_attributes
@product.name.should_not be_nil
end
it "should have product lines"
end
and run:
-----------------------------------------------------------------------------
D:\IronRuby\RSpec>ir product_spec.rb
c:\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\FileOps
.cs:522:in `ExpandPath'': Invalid argument - product_spec.rb:0
(Errno::EINVAL)
from :0:in `expand_path''
from example_group_methods.rb:108:in `set_description''
from example_group_methods.rb:171:in `subclass''
from example_group_methods.rb:48:in `describe''
from example_group_factory.rb:25:in `create_example_group''
from main.rb:22:in `describe''
from product_spec.rb:0
Is there a work around people are using at the moment?
Cheers.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
so its a bug then. ok, i''ll take a look at it. any tips for a first time contributor ;-) -- Posted via http://www.ruby-forum.com/.
I fixed this particular issue. See attached. Its not in the main GIT repo though. The workaround for running the rubyspecs is to set HOME manually to %USERPROFILE%. We are also fixing dev.bat to set HOME for you, so you won''t have to worry about it. There are plenty of other tags (which disables a failing test) in http://github.com/ironruby/ironruby/tree/17de3f8220b0aa9da96f9c8f0c132db954721375/Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file. Delete anyone of them, run "mspec ci core\file" to see the test start failing (since the tag is gone), and then work on a fix. Once you have drilled into the issue a bit, I can help you as mentioned in the attached email. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Delaney Sent: Friday, March 27, 2009 11:42 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] expand_path & Rspec so its a bug then. ok, i''ll take a look at it. any tips for a first time contributor ;-) -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An embedded message was scrubbed... From: Shri Borde <Shri.Borde at microsoft.com> Subject: Review: Marshal bug Date: Thu, 26 Mar 2009 16:34:59 -0700 Size: 14563 URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090327/c1e03221/attachment.mht>
You''ll find them here: http://wiki.github.com/ironruby/ironruby Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Delaney Sent: Friday, March 27, 2009 11:42 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] expand_path & Rspec so its a bug then. ok, i''ll take a look at it. any tips for a first time contributor ;-) -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
There will be issues with expand_path as long as it uses Path.GetFullPath and Path.Combine. These methods check for invalid path characters while expand_path doesn''t. So we need an implementation that doesn''t use Path.* methods. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Friday, March 27, 2009 12:40 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] expand_path & Rspec I fixed this particular issue. See attached. Its not in the main GIT repo though. The workaround for running the rubyspecs is to set HOME manually to %USERPROFILE%. We are also fixing dev.bat to set HOME for you, so you won''t have to worry about it. There are plenty of other tags (which disables a failing test) in http://github.com/ironruby/ironruby/tree/17de3f8220b0aa9da96f9c8f0c132db954721375/Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file. Delete anyone of them, run "mspec ci core\file" to see the test start failing (since the tag is gone), and then work on a fix. Once you have drilled into the issue a bit, I can help you as mentioned in the attached email. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Delaney Sent: Friday, March 27, 2009 11:42 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] expand_path & Rspec so its a bug then. ok, i''ll take a look at it. any tips for a first time contributor ;-) -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core