On 5.7.2008, at 18.37, John Knox wrote:

David Chelimsky wrote:
What happens when you run the generated examples?

My code uses single table inheritance (STI) and a MySQL database, so I
thought it best to create some new simple projects with a single model.

(1) I created a new project using SQLite with a single model.  All 58
auto-generated specifications ran successfully.

(2) I created a new single-model project using SQLite but added a UUID
primary key.  All 58 auto-generated specifications ran successfully.

(3) I created a new project using MySQL with a single model. Again, all
58 auto-generated specifications ran successfully.

(4) (2) I created a new single-model project using MySQL but added a
UUID primary key.  All 58 auto-generated specifications ran
successfully.

Hmm.  So, it's not the UUIDs that are causing problems with my
application... but perhaps single table inheritance. Will do more tests
and post again when I've better defined the problem.

The thing is, the scaffolding specs are specs for the behaviour of the scaffolded controllers/models/views. If you want to change that behaviour, your specs should reflect that assumption. If you add some new code (without writing new specs for it), even in the form of using plugins, and your existing specs still run, it doesn't mean your code is working correctly because you didn't write specs for that part of the functionality yet. Using UUID probably changes things so little that (especially if/when they mock the models) it won't trip the scaffolding specs per se.

//jarkko

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to