0.0
No commit activity in last 3 years
No release in over 3 years
Tool for testing implementation independent AR components (like plugins)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

artester¶ ↑

Tool for testing AR implementation independent components (like plugins).

It recreate for every test tables (stores by sqlite in memory) and models.

Example¶ ↑

Artester.def :yaacl do

  model :user do
    definition do |t|
      t.string :name
      t.string :global_roles_list, :default => ''
    end

    klass do
      include YAACL::User
    end
  end

  model :role do
    definition do |t|
      t.integer :user_id
      t.string :entity_type
      t.integer :entity_id
      t.string :role
    end

    klass do
      include YAACL::Role
    end
  end
end

class UnitTest < Test::Unit::TestCase
  context "User creation" do
    setup do
      Artester[:yaacl].reload
      @author = User.create :name => 'Andrew'
    end
	end
end

Now you can use User as usual AR-model.

Copyright © 2009 Andrew Rudenko. See LICENSE for details.