Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6076ce259c
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.578 kb
require 'spec_helper'
describe WithoutScope::ActsAsRevisable, "with validations" do
after(:each) do
cleanup_db
end
before(:each) do
@post = Post.create(:name => 'a post')
@foo = Foo.create(:name => 'a foo')
end
describe "unique fields" do
it "should allow revisions" do
lambda {@post.revise!; @post.revise!}.should_not raise_error
end
end
describe "unique fields with validation scoping off" do
it "should not allow revisions" do
lambda {@foo.revise!; @foo.revise!}.should raise_error
end
end
end
Jump to Line
Something went wrong with that request. Please try again.