spec/readme_spec.rb in with_model-0.2.2 vs spec/readme_spec.rb in with_model-0.2.3
- old
+ new
@@ -1,10 +1,10 @@
require 'spec_helper'
describe "A blog post" do
- with_model :blog_post do
+ with_model :BlogPost do
# The table block works just like a migration.
table do |t|
t.string :title
t.timestamps
end
@@ -24,11 +24,11 @@
end
end
end
# with_model classes can have associations.
- with_model :comment do
+ with_model :Comment do
table do |t|
t.string :text
t.belongs_to :blog_post
t.timestamps
end
@@ -71,10 +71,10 @@
defined?(BlogPost).should be_false
end
end
describe "with table options" do
- with_model :with_options do
+ with_model :WithOptions do
table :id => false do |t|
t.string 'foo'
t.timestamps
end
end