On Sun, Sep 23, 2012 at 8:56 PM, S Ahmed wrote:
> Yes, I think I get it.
>
> The actual class can interact since it is kinda necessary and vital to
> testing int anyhow, but when other classes are depending on MyClass, you can
> stub/mock since they are outside the scope or domain of the MyClass,
Yes, I think I get it.
The actual class can interact since it is kinda necessary and vital to
testing int anyhow, but when other classes are depending on MyClass, you
can stub/mock since they are outside the scope or domain of the MyClass, so
they shouldn't have to be depending on the dependancies
On Sun, Sep 23, 2012 at 7:55 PM, S Ahmed wrote:
> I have a class that takes a class that inherits from activerecord as a
> parameter, e.g.:
>
> class SomeModel < ActiveRecord::Base
> end
>
> class MyClass
> attr_accessor :model
> def initialize(model)
> @model = model
> end
> end
>
>
> T
I have a class that takes a class that inherits from activerecord as a
parameter, e.g.:
class SomeModel < ActiveRecord::Base
end
class MyClass
attr_accessor :model
def initialize(model)
@model = model
end
end
The class MyClass will then iterate over the Models attributes etc.
Also I