I recently did some work around some bugs in the generated files
within the 3-1-stable branch.
I couldn''t see a way to construct a test to reproduce the issue, and
the changes were happily accepted.
What I am wondering is are there any mechanisms within rails (or a
support gem) which can enable full testing of the gem as it would be
used (an integration test of sorts).
If no such thing exists, what sort of things would be best used and
considered to do this. This sort of thing seems useful to me and my
team, and we''d happy consider putting some time into creating such
things.
I''m thinking something in rspec/shoulda along the following lines:
describe "MyGem" do
describe "generators" do
it {should generate :Rakefile}
it "should have helpers in Rakefile" do
generated(:Rakefile).should include
"Bundle::GemHelper.install_tasks"
end
end
end
this would be for testing paths in the generated files which switch on
conditions, or indeed to test and prevent regression of a particular
issue.
Maybe I''m being crazy obsessive about what I want to test, but this
seems to be something we''d want in a continuous integration enviroment
for developing gems rather than a final system.
Thanks, input would really be appreciated.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.