README.md in with_model-1.2.0 vs README.md in with_model-1.2.1
- old
+ new
@@ -1,12 +1,11 @@
# [with_model](https://github.com/Casecommons/with_model)
[](https://travis-ci.org/Casecommons/with_model)
-[](https://codeclimate.com/github/Casecommons/with_model)
-[](https://coveralls.io/r/Casecommons/with_model)
-[](https://rubygems.org/gems/with_model)
-[](https://gemnasium.com/Casecommons/with_model)
+[](https://codeclimate.com/github/Casecommons/with_model)
+[](https://coveralls.io/r/Casecommons/with_model)
+[](https://rubygems.org/gems/with_model)
`with_model` dynamically builds an ActiveRecord model (with table) before each test in a group and destroys it afterwards.
## Installation
@@ -54,11 +53,11 @@
with_model :BlogPost do
# The table block works just like a migration.
table do |t|
t.string :title
- t.timestamps
+ t.timestamps null: false
end
# The model block works just like the class definition.
model do
include SomeModule
@@ -78,11 +77,11 @@
# with_model classes can have associations.
with_model :Comment do
table do |t|
t.string :text
t.belongs_to :blog_post
- t.timestamps
+ t.timestamps null: false
end
model do
belongs_to :blog_post
end
@@ -152,10 +151,10 @@
describe "with table options" do
with_model :WithOptions do
table :id => false do |t|
t.string 'foo'
- t.timestamps
+ t.timestamps null: false
end
end
it "respects the additional options" do
expect(WithOptions.columns.map(&:name)).to_not include("id")