Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0b321f92e3
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 28 lines (22 sloc) 0.769 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
require 'spec_helper'

describe WithoutScope::ActsAsRevisable do
  after(:each) do
    cleanup_db
  end

  before(:each) do
    @project = Project.create(:name => "Rich", :notes => "this plugin's author")
    @project.update_attribute(:name, "one")
    @project.update_attribute(:name, "two")
    @project.update_attribute(:name, "three")
  end

  it "should have a pretty named association" do
    lambda { @project.sessions }.should_not raise_error
  end

  it "should return all the revisions" do
    @project.revisions.size.should == 3
  end

  it "should allow :with_revisions key for associations" do
    Person.create(:name => "Peter", :project => @project)
    lambda { @project.people.find(:first, :with_revisions => true) }.should_not raise_error
  end
end
Something went wrong with that request. Please try again.