[MacRuby-devel] [MacRuby] #336: NoMethodError with shoulda tests
MacRuby
ruby-noreply at macosforge.org
Wed Sep 16 13:59:49 PDT 2009
#336: NoMethodError with shoulda tests
----------------------------------------+-----------------------------------
Reporter: macruby@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone: MacRuby 0.5
Component: MacRuby | Keywords: shoulda
----------------------------------------+-----------------------------------
Comment(by macruby@…):
Apologies for the extremely bad formatting, here is a slightly better
formatted version
{{{
#!ruby
require 'test/unit'
require 'rubygems'
require 'shoulda'
require 'shoulda/test_unit'
framework 'Foundation'
class MacRubyShouldaTest < Test::Unit::TestCase
context "NSString instance" do
setup do
@string = NSString.stringWithString("~/Documents")
end
should "expand tilde in path" do
assert
@string.stringByExpandingTildeInPath.isEqualToString("#{ENV['HOME']}/Documents")
end
end
end
}}}
with the output of
{{{
Started
E.
Finished in 0.096728 seconds.
1) Error:
test: NSString instance should expand tilde in path.(MacRubyShouldaTest):
NoMethodError: undefined method `test: NSString instance should expand
tilde in path.' for #<MacRubyShouldaTest:0x2004db7c0>
0:in `send:'
0:in `run:'
0:in `each'
0:in `each'
0:in `run_test_suites:'
0:in `run:'
2 tests, 1 assertions, 0 failures, 1 errors, 0 skips
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/336#comment:1>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list