Skip to content

Instantly share code, notes, and snippets.

@hotgazpacho
Created June 9, 2010 04:52
Show Gist options
  • Save hotgazpacho/431068 to your computer and use it in GitHub Desktop.
Save hotgazpacho/431068 to your computer and use it in GitHub Desktop.
C:\Users\Will\dev\FactoryGirlSpike\InteropConsole\bin\Debug>ir
IronRuby 1.0.0.0 on .NET 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
>>> require 'factories.rb'
=> true
>>> u = Factory.build(:user)
=> CLR User: FirstName: John, LastName: Doe, Admin: False, Email somebody1@example.com
>>>
@jredville
Copy link

What about this:
[~] 1> ir
IronRuby 1.0.0.0 on .NET 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

>>> e = IronRuby.create_engine
=> Microsoft.Scripting.Hosting.ScriptEngine
>>> s = e.create_scope
=> Microsoft.Scripting.ScopeStorage

>>> e.execute("require 'factories.rb'",s)


>>> e.execute("u=Factory.build(:user)",s)


>>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment