I copied your Bubble Test App into a newly created spec/dummy (rails gem generator calls it this, not me!) directory. Your Cucumber features are still present in spec/dummy but I've started laying out a test framework in spec/xml_active_spec.rb. Next I was going to add factory_girl_rails methods to Bubble for generating test data and then start filling in some of the specs. You can accept my pull now, or wait until after I create the factories and finish an initial test or two done, or let me know if you just hate this testing framework. You can preview the new testing framework by running rake spec which will run though the pending specs.
Add in Pre-Exixting Rails Test App
Add in the previously created rails test app, Bubble.
Add Bubble's Required Gems to XmlActive's Gemfile
Add in all the gems required for the test rails app, Bubble, to
Add Rspec Testing Framework
Add Spec Testing Task to Rakefile
Change the Way XmlActive Class Methods Are Imported
Remove growl-notify Gem, Add Gemfile.lock
Non-Mac OS X users don't need/want growl-notify. Gemfile.lock was being
ignored, but it's one of the best parts of bundler.
Re-add 'require "bundler/gem_tasks"' to Rakefile
Add *.log to .gitignore
Create Book Factory
Generates books with fake latin names with Faker.
Delete test.sqlite3 and add to .gitignore
Add Unique Name Valdation to Book Model
Improve XmlActive Spec
I've been doing a review of the code and how it works internally. Based on the review I'm identified a number of deficiencies with the current mechanism for matching the xml to ActiveRecords classes one that's highlighted is the absence of records for a one to many relationship where there are no "many" records. I've made the start to refactor the code so it examines the ActiveRecord structure as a priority rather than the XML structure. Given this it would be good if you held off any more changes until I have that in place. It may change what you're doing and lead to wasted effort. Thanks for providing the code changes. I'll be incorporating them into my reworking.
I've made the changes I was talking about and I've incorporated your changes as part of the refactoring. Could you please have a look over the new revision. I'd like to get your feedback before I do the next release to RubyGems. Thanks in advance.
I've been reviewing what you're doing with the testing and I'll be incorporating it in the coming weeks. There is a lot of merit to what you're proposing but for the time being I've continued with the cucumber testing in the external app.
I've done some additional testing and identified some issues and I've resolved them. Let me know when you've had a chance to checkout the latest master. I'm looking to release a new version to RubyGems in a few days.
Thanks for you help to date.
Thanks for your help. I'll be doing the release of 0.0.3 at the end of this week as I believe I've closed off this issue with the recent refactoring. Let me know if you think otherwise.
I've just released 0.0.3 and resolved some rails 3.1.x and 3.2.x issues due to changes in the AssociationReflection class. Thanks and again and let me know how you go with the new version.