README.rdoc in with_model-0.2.6 vs README.rdoc in with_model-0.3

- old
+ new

@@ -1,35 +1,25 @@ = with_model * http://github.com/casecommons/with_model/ -{<img src="https://secure.travis-ci.org/Casecommons/with_model.png" />}[http://travis-ci.org/Casecommons/with_model] +{<img src="https://secure.travis-ci.org/Casecommons/with_model.png" />}[http://travis-ci.org/Casecommons/with_model] {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/Casecommons/with_model] == DESCRIPTION +with_model+ dynamically builds an ActiveRecord model (with table) within an RSpec context. Outside of the context, the model is no longer present. == INSTALL gem install with_model -=== RSpec 2 - In spec_helper.rb: RSpec.configure do |config| config.extend WithModel end -=== Rspec 1 - -In spec_helper.rb: - - Spec::Runner.configure do |config| - config.extend WithModel - end - == USAGE In an RSpec example group, call +with_model+ and inside its block pass it a +table+ block and a +model+ block. require 'spec_helper' @@ -117,19 +107,13 @@ it "should respect the additional options" do WithOptions.columns.map(&:name).should_not include("id") end end -=== Mixico - -If you have the +mixico+ gem installed, WithModel will automatically unmix any modules that were mixed into your model class. Without +mixico+, each module will hold a reference to the class for the remainder of your test suite. - -Usually unmixing isn't necessary, but it can be helpful if you use something like Module#included_in_classes (from Active Support 2.3) in a later test to ask a module which classes it has been mixed into. - == REQUIREMENTS -* RSpec -* ActiveRecord 2 or 3 +* RSpec 2.11 or higher (for earlier RSpec versions, use 0.2.x) +* ActiveRecord 3 (for ActiveRecord 2, use 0.2.x) == LICENSE: MIT