[MacRuby-devel] My Current UI Testing Setup

2010-06-23 Thread Ryan Davis
Here is my current macruby UI testing setup:

Rakefile:

+ Has an isolate setup to pull down all my testing gems.
+ task build - runs xcodebuild to build a debug app
+ task link  - runs a build and then hard links source files to build
   files

~/.emacs.el:

+ sets 'backup-by-copying-when-linked to t - allowing work on
  hardlinked files to go unimpeded.

.autotest:

+ Sets ENV['RUBY'] to macruby.
+ Sets ENV['MACRUBY_TESTING'] to 1.
+ Sets ENV['GEM_HOME'] and ENV['GEM_PATH'] with expanded paths to pick
  up isolated gems during test runs.
+ initialize hook sets the test framework to minitest and runs the
  link rake task.
+ Overrides Autotest#make_test_cmd to execute the binary directly.

lib/app_controller.rb:

+ sets $TESTING = ENV['MACRUBY_TESTING']
+ applicationDidFinishLaunching requires minitest/macruby if $TESTING

rb_main.rb:

+ needed to be tweaked to skip loading test files.

So, when I fire up autotest it will build the application and then
hardlink all the original source files into the build. This allows
autotest to scan the lib and test dirs but invoking the application
will pick up all my changes without having to rebuild. This greatly
speeds up development.

When autotest runs the application directly, it does so with
MACRUBY_TESTING set in the environment. The application sees this and
sets $TESTING to true and once the app is done launching, it loads
minitest/macruby. That in turn loads up all the test files in the
build dir and then runs the tests. Once the tests are run, it exits
with the appropriate exit code depending on test results.


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] My MiniTest extensions for macruby

2010-06-23 Thread Ryan Davis
> class MiniTest::Unit
>   def self.run_macruby_tests
> 
> module MiniTest::Assertions
>   def find_ui_menu(*path)
>   def find_ui_menu_items menu
>   def assert_ui_menu menu, *items
>   def find_ui_menu_item(*path)
>   def assert_ui_action obj, target, action, key = nil
>   def assert_ui_binding item, binding_name, target, path

Allowing me to write tests like:

>   def test_ui_wirings
> app = NSApplication.sharedApplication
> delegate = app.delegate
> 
> assert_kind_of AppController,delegate
> assert_kind_of NSWindow, delegate.window
> assert_kind_of NSOutlineView,delegate.sidebar
> assert_kind_of NSTextField,  delegate.label
> assert_kind_of NSCollectionView, delegate.files
> 
> assert_ui_menu("File",
>"Restart Triage",
>"Empty Triage",
>"Update",
>"",
>"Reveal",
>"Group",
>"Ungroup",
>"Move to Triage",
>"Move to Trash")
> 
> has_selection = "sidebar.numberOfSelectedRows"
> 
> restart, empty, update, _, reveal, group, ungroup, triage, trash =
>   find_ui_menu_items "File"
> 
> assert_ui_action restart, delegate, "restart:", ""
> 
> assert_ui_action empty, delegate, "empty:"
> 
> assert_ui_action update, delegate, "update:", "u"
> 
> assert_ui_action  reveal, delegate, "reveal:", "r"
> assert_ui_binding reveal, :enabled, delegate, has_selection
> 
> assert_ui_action  triage, delegate, "triage:", "t"
> assert_ui_binding triage, :enabled, delegate, has_selection
> 
> assert_ui_action group, delegate, "group:"
> assert_ui_binding group,  :enabled, delegate, has_selection
> 
> # TODO: make it properly toggle later
> assert_ui_action ungroup, delegate, "ungroup:"
> assert_ui_binding ungroup, :enabled, delegate, has_selection
> 
> assert_ui_action  trash, delegate, "trash:"
> assert_ui_binding trash,  :enabled, delegate, has_selection
>   end
> 
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] My MiniTest extensions for macruby

2010-06-23 Thread Ryan Davis

On Jun 23, 2010, at 12:21 , Ryan Davis wrote:

>> class MiniTest::Unit
>>  def self.run_macruby_tests
>> 
>> module MiniTest::Assertions
>>  def find_ui_menu(*path)
>>  def find_ui_menu_items menu
>>  def assert_ui_menu menu, *items
>>  def find_ui_menu_item(*path)
>>  def assert_ui_action obj, target, action, key = nil
>>  def assert_ui_binding item, binding_name, target, path

I'm torn between releasing this as part of minitest or releasing it under a new 
gem called minitest-macruby (or something).

I'd also love to see more ideas for assertions and helper methods and the 
like... the more the merrier.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] My MiniTest extensions for macruby

2010-06-23 Thread Ryan Davis

On Jun 23, 2010, at 13:13 , Matt Aimonetti wrote:

> I'd suggest to release a new gem.

yeah... but the reason why I'm torn is that if it goes into minitest directly, 
it goes into macruby directly... easy-peasy for everyone.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] My MiniTest extensions for macruby

2010-06-23 Thread Ryan Davis

On Jun 23, 2010, at 13:31 , Laurent Sansonetti wrote:

> Ryan, would you be willing to commit & maintain these bits in our SVN 
> repository if we give you access?

but of course. seems only fair.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] testing?

2010-07-09 Thread Ryan Davis
So are you guys not testing your macruby code? I was hoping that the ruby 
community would bring the testing culture to the cocoa world and make it a 
better place. Having gotten no feedback/suggestions whatsoever on my testing 
setup has me a bit wary.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] testing?

2010-07-09 Thread Ryan Davis

On Jul 9, 2010, at 12:47 , steve ross wrote:

> iCuke seems promising, but it is for iPhone dev 
> [http://github.com/unboxed/icuke]. Probably could be repurposed for general 
> Cocoa development. Bacon works, but I've found it more helpful for unit tests 
> -- headless testing. In an automated sense, like 'rake test', there just 
> isn't an analogous build step AFAIK. This is very uncomfortable for me. It's 
> what's holding me up in getting going fully with MacRuby.

Well please try out my (incomplete) solution to the problem. I _do_ have 
`rake test` working for UI testing. I even have a quasi-autotest running... but 
I don't think it is to the point of sharing it yet.
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] testing?

2010-07-09 Thread Ryan Davis

On Jul 9, 2010, at 13:29 , Watson wrote:

> Hi.
> 
> I use the unit test of Ruby1.9.2 RC1 and test MacRuby itself :D
> 
> - http://github.com/Watson1978/test-macruby
> - http://github.com/Watson1978/test-macruby/downloads

cheater. :P

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] testing?

2010-07-09 Thread Ryan Davis

On Jul 9, 2010, at 15:03 , Jordan K. Hubbard wrote:

> On Jul 9, 2010, at 12:05 PM, Ryan Davis wrote:
> 
>> So are you guys not testing your macruby code? I was hoping that the ruby 
>> community would bring the testing culture to the cocoa world and make it a 
>> better place. Having gotten no feedback/suggestions whatsoever on my testing 
>> setup has me a bit wary.
> 
> MacRuby runs a large number of specs, and improving the % of specs which pass 
> is a constant effort (we measure this frequently).  Or were you talking about 
> Cocoa developers integrating tests into their MacRuby apps?

I was talking about the latter, esp wrt my emails from 2010-06-23. (Much more 
fun. rubyspec is boring. :P)

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] testing?

2010-07-10 Thread Ryan Davis

On Jul 10, 2010, at 14:27 , Daniel Lopes wrote:

> I'm very interested in your test solution Ryan but right now I did a small 
> break in MacRuby but as soon as finish what I'm doing now I will try it. 
> 
> Also the ability to have Minitest/Minispec by default inside MacRuby is just 
> awesome. This idea will proceed?

Yes, minitest is the basis in 1.9. I try to keep it in sync with my gem 
releases, but 1.9.2 is about to come out so it'll prolly fall behind after that 
for a while.

> Thanks for Minitest and the env for tests in MacRuby.

No prob! Thanks!

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [ANN] minitest-macruby 1.0.0 Released

2010-07-15 Thread Ryan Davis
minitest-macruby version 1.0.0 has been released!

* 

minitest-macruby provides extensions to minitest for macruby UI
testing. It provides a framework to test GUI apps in a live instance.
Documentation and examples are light at the moment as I've just thrown
this together. Suggestions for extensions are very welcome!

Currently it provides the following methods in minitest's assertions:

* self.run_macruby_tests
* find_ui_menu(*path)
* find_ui_menu_items menu
* assert_ui_menu menu, *items
* find_ui_menu_item(*path)
* assert_ui_action obj, target, action, key = nil
* assert_ui_binding item, binding_name, target, path

Changes:

### 1.0.0 / 2010-07-15

* 1 major enhancement

 * Birthday!

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] sorting colors (MacRuby Graphics)

2010-07-28 Thread Ryan Davis

On Jul 15, 2010, at 23:10 , Matt Aimonetti wrote:

> I wrote a new sample for MacRuby Graphics that samples the colors from a jpg 
> and display them. 
> I was trying to find a good way to sort the colors in a way that makes total 
> sense (sort by color family and by brightness). Unfortunately, this isn't an 
> easy thing to do, here is the result:
> 
> http://img.skitch.com/20100716-nth8dcm4ag12bcns1fgngt4ird.png
> Source code: 
> http://github.com/mattetti/macruby_graphics/blob/master/examples/color_sampler_example.rb
> 
> I'd be curious to know if one of you knows a better way to do that?

IIRC, you usually convert from rgp to hsv and sort on [h, s, v] or [h, v, s]. I 
can't tell from your code sample what the sort is doing.
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] An easy way to add .rb files to Xcode build automatically?

2010-07-28 Thread Ryan Davis

On Jul 27, 2010, at 10:25 , Michael Jackson wrote:

> I usually write all of my Ruby code in Vim, but I'm using Xcode to
> keep my project organized and to build/debug/etc. Whenever I create a
> new file in Vim I have to go into my Xcode project and add the files
> to the "Classes" group manually. Is there a good way to set up a
> folder reference in Xcode that will automatically keep track of my new
> .rb files and copy them to the project root when I build? Or do I
> always have to add them manually?
> 
> I tried adding a folder to the root of my project called "Classes" in
> which I put all of my Ruby code. I then added that folder reference to
> the project. However, when I build the project the files are copied to
> a "Classes" folder in the build instead of to the project root where
> they can be found by main.rb.

That's better than finally wound up with.

I was planning on having a gem structured project with your above setup and 
then adjust LOAD_PATH accordingly from rb_main to include the build dir's lib. 
I guess I missed the second step of the reference to the folder in the project 
or something.


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] (Mac)?Gems in the same place

2010-09-15 Thread Ryan Davis

On Sep 15, 2010, at 10:56 , Iain Barnett wrote:

> 
> On 15 Sep 2010, at 18:48, Thibault Martin-Lagardette wrote:
> 
>> 
>> By default, macgem installs gems in 
>> /Library/Frameworks/MacRuby.framework/Versions/0.7/usr/lib/ruby/Gems/1.9.2/gems
> 
> Thanks. I'd ran `macgem env` and got the same output as `gem env` and got a 
> bit worried, but if you're sure it'll ignore that then I can put away the 
> diazepams :)

yeah. this is probably a problem. I'm guessing you have GEM_PATH set in your 
environment like I do. I've got:

GEM_PATH=/Library/Ruby/Gems/1.8

and right now I can't even run `macgem env` because it is freakin' out on me 
and taking up 450+ MB of ram. I'm chasing that down as it is prolly a tangent.

rubygems and/or macruby should probably be patched to include RUBY_ENGINE 
somewhere in the gem path.

Eric... having a GEM_PATH like variable where I can specify it non-versioned 
would be great too. One variable to rule them all.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] (Mac)?Gems in the same place

2010-09-15 Thread Ryan Davis

On Sep 15, 2010, at 15:30 , Iain Barnett wrote:

> 
> On 15 Sep 2010, at 22:43, Ryan Davis wrote:
> 
>> 
>> rubygems and/or macruby should probably be patched to include RUBY_ENGINE 
>> somewhere in the gem path.
> 
> That's a really good idea. Either that or just accept that macruby is a 
> separate thing altogether and have MAC_GEM_PATH etc etc. Proliferation of 
> vars doesn't bother me, they only get set once.

yes, but then you have a proliferation of rubygem implementations... I'd prefer 
we work out something that works for everyone so that when you say 1.3.8 of 
rubygems it means the same across all ruby impls.


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [ANN] MacRuby 0.7

2010-10-11 Thread Ryan Davis

On Oct 5, 2010, at 22:40 , Antony Blakey wrote:

> http://rvm.beginrescueend.com/ ? or use bundler from rails (which IIUC is 
> independent of rails)

or isolate, the smaller cleaner happier alternative to bundler.

I haven't tried using isolate on macruby yet, but let me know if you have any 
issues.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [ANN] MacRuby 0.7

2010-10-12 Thread Ryan Davis

On Oct 11, 2010, at 12:56 , John Barnette wrote:

> On Oct 11, 2010, at 11:54 AM, Ryan Davis wrote:
>> I haven't tried using isolate on macruby yet, but let me know if you have 
>> any issues.
> 
> The tests segfault on 0.7 right now, I have a note to look at this before the 
> next Isolate release.

I'm poking at it... I'm not even getting a segfault, just hanging out spinning 
CPU and eating a TON of RAM. It never even gets to the first test for some 
reason.

Here is a sample:

>   1968 rary_reserve
> 1968 rb_yield
>   1968 rb_vm_yield_args
> 1968 MREP_4A9E42EFE9E24C529FBC1397F1146174
>   1968 0x103324011
> 1968 rb_vm_dispatch
>   1968 MREP_4A9E42EFE9E24C529FBC1397F1146174
> 1968 0x103324011
>   1968 rb_vm_dispatch
> 1968 rb_f_eval
>   1968 rb_vm_run_under
> 1968 rb_vm_run
>   1968 0x102da92d3
> 1968 rb_vm_prepare_block
>   1968 rb_vm_const_is_defined
> 1968 rb_str_NSCoder_decode
>   1968 rb_str_NSCoder_decode
> 1968 rb_str_NSCoder_decode
>   1968 rb_str_NSCoder_decode
> 1968 rb_str_NSCoder_decode
>   1968 rb_str_NSCoder_decode
> 1968 rb_str_NSCoder_decode
>   1968 rb_str_NSCoder_decode
> 1968 rb_str_NSCoder_decode
>   1968 rb_str_NSCoder_decode
> 1968 rb_str_NSCoder_decode
>   1968 
> rb_str_NSCoder_decode
> 1967 
> rb_str_NSCoder_decode
>   1679 
> rb_str_NSCoder_decode
> 1659 
> rb_str_NSCoder_decode
> 20 
> rb_str_NSCoder_decode
>   288 
> rb_str_NSCoder_decode
> 1 
> rb_str_NSCoder_decode


Is there an easy way to know what NSCoder#decode is getting pissy about?

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [ANN] MacRuby 0.7

2010-10-15 Thread Ryan Davis

On Oct 12, 2010, at 15:03 , Laurent Sansonetti wrote:

> Hard to tell, how do you reproduce this?
> 
> I wouldn't look too much at the stacktrace, since the symbols might be 
> corrupted.
> 

`macrake` in isolate will reproduce immediately.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Weird behaviour for a weird line of code

2010-11-15 Thread Ryan Davis

On Nov 14, 2010, at 18:37 , Mark Rada wrote:

> Now, when I try this out in macirb: (Case #3)
> 
>   require 'uri'
>   test = URI.parse url unless (url = 'http://macruby.org/').nil?  # error
>   test = URI.parse url unless (url = 'http://wikipedia.org/').nil? # works
> 
> If it doesn't work in the second case, why does it start working in the third 
> case?

First off, I hate this style of coding. If you didn't assign in a conditional 
you'd avoid all of this crap to begin with. Assigning in conditionals is just a 
sloppy and error prone way of coding and you should avoid it. This has been a 
known anti-pattern in any algol-esque language since at least the 80s.

That said... This actually has nothing to do with macruby and is an effect of 
the ruby parser. It is about variable visibility.

In case 3:

+ The first line has "URI.parse url" followed by "unless (url = ...).nil?"
  + The first 'url' is actually parsed as a method call because the word has 
never been seen before and wasn't added to the variable table. The second url 
DOES add url to the variable table.
+ The second line has the same thing, but by now, "url" has been added to the 
variable table. This lets everything be parsed as a variable at parse time.

Here is how you should code it:

>   require 'uri'
>   url  = "http://macruby.org/";
>   test = URI.parse url if url
>   url  = "http://wikipedia.org/";
>   test = URI.parse url if url

no variable parse ambiguity. no testing for nil specifically (.nil? is almost 
NEVER needed, just test for truthiness--imagine what happens when someone sets 
url to false with your code). clean. readable.

Your code all it's nerdiness:

s(:block,
 s(:if, s(:call, s(:lasgn, :url, s(:str, "http://macruby.org/";)),
  :nil?, s(:arglist)),
   nil,
   s(:lasgn, :test,
s(:call, s(:const, :URI), :parse,
  s(:arglist, s(:call, nil, :url, s(:arglist)), # HERE IT IS A CALL
 s(:if, 
   s(:call, s(:lasgn, :url, s(:str, "http://wikipedia.org/";)), :nil?,
 s(:arglist)),
   nil,
   s(:lasgn, :test,
s(:call, s(:const, :URI), :parse, s(:arglist, s(:lvar, :url))

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Weird behaviour for a weird line of code

2010-11-16 Thread Ryan Davis

On Nov 16, 2010, at 14:14 , Eric Christopherson wrote:

> I'm not sure I understand what you mean. Are you saying it's bad to do
> the *first* assignment to a variable inside a conditional? Or it's bad
> to assign inside a conditional in any case? I can understand the
> first, but I'm not sure how you would work around the second, unless
> you used a more functional style like
> 
> x = (n > 2 ? true : false)
> 
> or
> 
> x = (if n > 2; true; else false; end)

this is not an assignment inside a conditional. It is a conditional inside an 
assignment. And as Jeff pointed out, while just an example, it is a very 
contrived example (that hits one of my biggest pet peeves).

an assignment inside a conditional is

do_something(x) if x = logical_statement

or

if x = logical_statement then
  do_something(x)
else
  do_something_else
end

and whether you're coding in ruby, C/++, or whatever... it is almost always 
considered bad form. Avoid it not only for the reasons I mentioned before, but 
also to avoid the beat downs you'll get whenever you ask for our community's 
help. I cannot guarantee your safety otherwise.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] converging for 1.0

2010-12-02 Thread Ryan Davis

On Dec 1, 2010, at 07:29 , Matt Aimonetti wrote:

> Come on people svn isn't that bad, most of us used it for years and might 
> still use it ;) 
> However, if you are a git addict, you have 3 options:
> * use the github mirror (we'll do the svn patching ourselves)
> * use the macosforge git repo (same as github)
> * use gitsvn
> 
> Also, while you are reflecting on your options, please pause a second in 
> respect for people like me having to use perforce on a regular basis ;)
> 
> Thank you all, your contribution will make the next release even better.

Hey matt... we talked at rubyconf about getting my test stuff bundled in 
macruby. What do you need from me?

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Test First

2010-12-31 Thread Ryan Davis

On Dec 31, 2010, at 18:26 , Brad Hutchins wrote:

> Will Rspec2 and Cucumber be brought into MacRuby for test first?  If not what 
> framework will be used?

brought into? do they not work as gems with macruby?


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Issue with running unit tests when requiring rubygems

2011-02-14 Thread Ryan Davis

On Feb 13, 2011, at 05:56 , Gabriel Ayuso wrote:

> I reinstalled the minitest and mocha gems to the following versions: 
> minitest-2.0.2, mocha-0.9.12
> The same issue I described before occurred once again.
> 
> Here's the code I ran on macirb and the result: 
> 
> require 'rubygems'#=> true
> gem 'minitest'#=> true
> require 'test/unit'   #=> true
> require 'mocha'   #=> true
> class QuickTest < Test::Unit::TestCase
>def test_quick
>  obj = mock('obj')
>  obj.expects(:a).returns(true)
>  assert( obj.a )
>end
>  end  # => nil
> exit

I can confirm this with the following minimal repro:

require "rubygems"
require "isolate"

Isolate.now! :system => false do
  gem "minitest"
  gem "mocha"
end

gem "minitest"
require "minitest/autorun"
require "mocha"

class QuickTest < MiniTest::Unit::TestCase
  def test_quick
obj = mock("obj")
  end
end

The test only fails on macruby and with mocha. I'll file a ticket.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Issue with running unit tests when requiring rubygems

2011-02-14 Thread Ryan Davis

On Feb 14, 2011, at 15:23 , Ryan Davis wrote:

> The test only fails on macruby and with mocha. I'll file a ticket.

https://www.macruby.org/trac/ticket/1161

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Issue with running unit tests when requiring rubygems

2011-02-14 Thread Ryan Davis
here is the workaround:

require "rubygems"
require "isolate"

Isolate.now! :system => false do
  gem "minitest"
  gem "mocha"
end

class Module
  def remove_method x
# do nothing
  end
end if defined?(RUBY_ENGINE) and RUBY_ENGINE == "macruby"

gem "minitest"
require "minitest/autorun"
require "mocha"

class QuickTest < MiniTest::Unit::TestCase
  def test_quick
obj = mock("obj")
  end
end

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] macruby_deploy --gem

2011-03-02 Thread Ryan Davis

On Mar 1, 2011, at 18:57 , Russ McBride wrote:

> 
> I've stopped fighting with gems and just gave into the new --gem option in 
> macruby_deploy today.  Alas, I'm fighting with gems again.
> 
> My app, which I'm adding features to, btw, has been running quite nicely here 
> at UC Berkeley to drive Selenium as a web app probing and monitoring device.
> 
> I'm getting this error as I try to embed the action_mailer gem in my app:
> 
>   Cannot locate gem `action_mailer' in ["/Users/r/.gem/macruby/1.9.2", 
> "/Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2"]
> 
> But I've got the action_mailer gem in both locations, along with it's 
> dependencies, so I'm confused.  
> 
> It'd be nice if there was a definitive web page for managing gems in MacRuby 
> (or maybe there is and I'm missing it).  Part of the problem is that I'm 
> using RVM which has a distinct file hierarchy

1) Don't thread hijack. Some (most?) of us use real mail clients and you're 
screwing up threading.

2) Don't fight with gems. You'll lose. :P

3) Don't embed gems inside of gems. Use gem dependencies properly and you'll be 
a lot happier.

Using hoe it is as simple as:

Hoe.spec 'my_thingy' do
  developer 'Ryan Davis', '[email protected]'

  dependency 'action_mailer', '~> 3.0'
end

Then a regular gem activation or require should find the gem just fine.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] MiniTest and TestUnit implementations

2011-05-12 Thread Ryan Davis

On May 4, 2011, at 05:08 , anoiaque wrote:

> Why both minitest and testunit modules are so tied to output in the code ...
> Why is there no class/instance method with which i can get result as an 
> object (~ Minitest::Unit.run() => 
> )
> 
> Why must i hack theses modules(even if its quite easy with ruby) to get 
> result as an object i can work with [...] :
> 

Probably because you haven't filed a ticket or otherwise communicated with me 
at all.

It's getting old folks.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel