On Fri, Nov 13, 2009 at 10:04 AM, Arco wrote:
> I'm using datamapper and have two associated classes:
> - Org - has n, :users
> - User - belongs_to :org
>
> When I test the User object, I have been able to mock/stub methods of
> the Org object. Great!
>
> But - I still need to require 'org.rb' t
I'm using datamapper and have two associated classes:
- Org - has n, :users
- User - belongs_to :org
When I test the User object, I have been able to mock/stub methods of
the Org object. Great!
But - I still need to require 'org.rb' to setup my user tests -
otherwise Datamapper will complain: "C
> What happens when you try it?
>
> (You *do* have the power to experiment, you know. You don't need permission.)
C:\dev\ruby\old\arguments\spec>ruby arguments_spec.rb
arguments_spec.rb:5: undefined method `describe' for main:Object
(NoMethodError)
or adding a
require 'spec'
in there
C:\dev\
On Fri, Nov 13, 2009 at 2:28 AM, Amit Kulkarni wrote:
> MY spec helper contains following code:
> # This file is copied to ~/spec when you run 'ruby script/generate
> rspec'
> # from the project root directory.
> ENV["RAILS_ENV"] ||= 'test'
> require
>
> File.expand_path(File.join(File.dirname(__
MY spec helper contains following code:
# This file is copied to ~/spec when you run 'ruby script/generate
rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
require
File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment'))
require 'spec'
require 'webrat'