spec/temping_spec.rb in temping-1.1.0 vs spec/temping_spec.rb in temping-1.2.0
- old
+ new
@@ -8,11 +8,11 @@
posts = create_model :posts
posts.ancestors.should include(ActiveRecord::Base)
end
it "evals all statements passed in through a block" do
- votes = create_model :votes do
+ create_model :votes do
with_columns do |table|
table.string :voter
end
validates_presence_of :voter
@@ -23,11 +23,11 @@
vote.voter = "John Pignata"
vote.should be_valid
end
- it "raises ModelAlreadyDefined if a const is already defined" do
- lambda { 2.times { create_model :dogs }}.should raise_error(Temping::ModelAlreadyDefined)
+ it "silently skip initialization if a const is already defined" do
+ lambda { 2.times { create_model :dogs }}.should_not raise_error(Temping::ModelAlreadyDefined)
end
describe ".with_columns" do
it "creates columns passed in through a block" do
create_model :comments do
\ No newline at end of file