Re: [rspec-users] Removing an AR class definition, for testing plugins

2007-09-10 Thread Carl Porth
You can do something like in rspec/spec/spec/mocks/stub_spec.rb where the class is defined in before(:each). This way your specs aren't dependent on an external class definition. Carl On Sep 10, 2007, at 3:12 PM, Pat Maddox wrote: > I'm writing an acts_as_* plugin and am trying to BDD it.

[rspec-users] Removing an AR class definition, for testing plugins

2007-09-10 Thread Pat Maddox
I'm writing an acts_as_* plugin and am trying to BDD it. Ideally my specs would look like: describe ActsAsCloneable, " basic cloning" do load_example_classes School.class_eval do acts_as_cloneable end before(:each) do @old_school = School.create! :name => "Baylake Pines", :city =