| Hi all, I'm trying to use Bacon with MacRuby, and am running into an odd error:
Running it with "bacon" on the command-line avoids the problem, and 'fails' correctly. :-) Here's my config -- any suggestions? Is this a real bug, or user error? -- Ernie P.
I am using the whirlwind tutorial for Bacon 1.1:
... |
#!/usr/local/bin/macruby
require 'rubygems'
require 'bacon'
describe 'A new array' do
before do
@ary = Array.new
end
it 'should be empty' do
@ary.should.be.empty
@ary.should.not.include 1
end
it 'should have zero size' do
@ary.size.should.equal 0
@ary.size.should.be.close 0.1, 0.5
end
it 'should raise on trying fetch any index' do
lambda { @ary.fetch 0 }.
should.raise(IndexError).
message.should.match(/out of array/)
# Alternatively:
should.raise(IndexError) { @ary.fetch 0 }
end
it 'should have an object identity' do
@ary.should.not.be.same_as Array.new
end
# Custom assertions are trivial to do, they are lambdas returning a
# boolean vale:
palindrome = lambda { |obj| obj == obj.reverse }
it 'should be a palindrome' do
@ary.should.be.a palindrome
end
it 'should have super powers' do
should.flunk "no super powers found"
end
end
_______________________________________________ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
