Josh Knowles wrote:
>There are forks out on github which have specs and have
> fixed the problem with validate_uniqueness_of.
I have test a plugin with that fixed (from negonicrac) and it still has
the same problem for me.
I see that this plugin already has specs, and want to try them.
But I don
On Mon, Dec 29, 2008 at 7:20 AM, David Chelimsky wrote:
> I don't see any specs for the rspec-on-rails-matchers library on
> github, and no activity in 9 months, so I'm guessing that it is
> incomplete/no longer being maintained.
>
> Josh Knowles, if you're reading this, can you respond?
I unfort
David Chelimsky wrote:
> I'm not really sure why this is stubbing find, or why the stub value
> is true instead of a model. Actually, I don't even see how this would
> specify validating uniqueness of the attribute without very specific
> setup:
>
> first = Centro.create(:nombre => "example")
> s
On Mon, Dec 29, 2008 at 5:04 AM, Juanma Cervera wrote:
> I am fighting with an error using rspec-on-rails-matchers.
>
> I have a model called "Centro" based in this table
>
> create_table "centros", :force => true do |t|
>t.string "nombre"
>t.string "cif"
>t.string "domicilio"
>
Well, it seems tha the error is indeed in the stubbing of the find
method in the class of the model.
def validate_uniqueness_of(attribute)
return simple_matcher("model to validate the uniqueness of
#{attribute}") do |model|
model.class.stub!(:find).and_return(true)
!model.valid? && mod
I am fighting with an error using rspec-on-rails-matchers.
I have a model called "Centro" based in this table
create_table "centros", :force => true do |t|
t.string "nombre"
t.string "cif"
t.string "domicilio"
t.string "codigo_postal"
t.string "poblacion"
t.str