Has someone tried to use Shoulda with IronRuby?

Hi there,

I’m trying to use Shoulda to test code (not in a Rails project) and I
can’t
get it to work. It seems like it doesn’t convert the should statements
to
test methods at all.
Has anyone run into this before?

Thanks,
Shay.

I get the same problem with test-spec. Both frameworks enhance
Test::Unit and they both don’t work…

Thanks,
Shay.

Shay F. wrote:

Hi there,

I’m trying to use Shoulda to test code (not in a Rails project) and I
can’t
get it to work. It seems like it doesn’t convert the should statements
to
test methods at all.
Has anyone run into this before?

Thanks,
Shay.

Shoulda has a test suite. Have you run that to see what breaks?

Will G.
http://hotgazpacho.org/

When I run it, it doesn’t find any test cases (even though I have
one)…
So nothing breaks because nothing is run.

Thanks,
Shay.

Shay F. | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed | Sela Technology Center
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay

This doesn’t work for me:

require ‘rubygems’
require ‘shoulda’

class MyTest < Test::Unit::TestCase
context “something” do
should “be true” do
assert true
end
end
end

Shay F. | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed | Sela Technology Center
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay

This what I did:
cd %HOME%\dev
ir -S gem install rake shoulda rails sqlite3-ironruby mocha --no-rdoc
–no-ri
git clone http://github.com/thoughtbot/shoulda.git
cd shoulda
ir -S rake test

It appears to pass. Results are here: http://gist.github.com/356509


Will G.
http://hotgazpacho.org/

No, I don’t have MRI installed on this computer (I’m loyal to my
IronRuby!
:slight_smile: )… If someone can try it, please do.

Thanks,
Shay.

Shay F. | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed | Sela Technology Center
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay

I’ll have to try that later.

Have you run the shoulda tests on MRI? Does it report a different number
of
Tests and Assertions?

Will G.
http://hotgazpacho.org/

OK, I installed MRI and it worked. So it’s a problem with IronRuby…


Shay F. | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed | Sela Technology Center
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay

Filed a bug:
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=4327.

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Shay F.
Sent: Tuesday, April 06, 2010 8:10 AM
To: [email protected]
Subject: Re: [Ironruby-core] Has someone tried to use Shoulda with
IronRuby?

OK, I installed MRI and it worked. So it’s a problem with IronRuby…


Shay F. | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed | Sela Technology Center
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay

On Tue, Apr 6, 2010 at 3:36 PM, Shay F.
<[email protected]mailto:[email protected]> wrote:
No, I don’t have MRI installed on this computer (I’m loyal to my
IronRuby! :slight_smile: )… If someone can try it, please do.

Thanks,
Shay.

Shay F. | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed | Sela Technology Center
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay

On Tue, Apr 6, 2010 at 3:16 PM, Will G.
<[email protected]mailto:[email protected]> wrote:
I’ll have to try that later.

Have you run the shoulda tests on MRI? Does it report a different number
of Tests and Assertions?


Will G.
http://hotgazpacho.org/

On Tue, Apr 6, 2010 at 2:54 AM, Shay F.
<[email protected]mailto:[email protected]> wrote:
This doesn’t work for me:

require ‘rubygems’
require ‘shoulda’

class MyTest < Test::Unit::TestCase
context “something” do
should “be true” do
assert true
end
end
end

Shay F. | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed | Sela Technology Center
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay

On Mon, Apr 5, 2010 at 6:00 PM, Will G.
<[email protected]mailto:[email protected]> wrote:
This what I did:
cd %HOME%\dev
ir -S gem install rake shoulda rails sqlite3-ironruby mocha --no-rdoc
–no-ri
git clone http://github.com/thoughtbot/shoulda.git
cd shoulda
ir -S rake test

It appears to pass. Results are here: http://gist.github.com/356509


Will G.
http://hotgazpacho.org/

On Mon, Apr 5, 2010 at 10:32 AM, Shay F.
<[email protected]mailto:[email protected]> wrote:
When I run it, it doesn’t find any test cases (even though I have
one)…
So nothing breaks because nothing is run.

Thanks,
Shay.

Shay F. | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed | Sela Technology Center
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay

On Mon, Apr 5, 2010 at 4:26 PM, Will G.
<[email protected]mailto:[email protected]> wrote:
Shoulda has a test suite. Have you run that to see what breaks?

Will G.
http://hotgazpacho.org/

On Mon, Apr 5, 2010 at 9:30 AM, Shay F.
<[email protected]mailto:[email protected]> wrote:
I get the same problem with test-spec. Both frameworks enhance
Test::Unit and they both don’t work…

Thanks,
Shay.

Shay F. wrote:

Shay.

Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs