1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec
James Herdman 1b422a537f AASM defines constants for each state name
Example:

  class Foo
    include AASM

    aasm do
      state :initialized
      state :calculated
      state :finalized
    end
  end

  > Foo::STATE_INITIALIZED
  => :initialized
  > Foo::STATE_CALCULATED
  => :calculated

You may find this useful in custom scopes when using ActiveRecord, or
when testing your classes.
2013-03-15 00:07:01 -04:00
..
models continued to refactor instance methods for AASM objects 2013-02-22 19:15:03 +13:00
spec_helpers cleaning up specs 2012-12-04 16:27:47 +13:00
unit AASM defines constants for each state name 2013-03-15 00:07:01 -04:00
database.yml using real database connections for testing to reduce dependency on Rails version (previously mocked away ActiveRecord connection, which is not used in Rails 3.1 anymore) 2011-08-31 23:49:09 +02:00
en.yml added support for localized state names (on a class level, like Record.aasm.states.map(&:localized_name)) 2012-12-27 10:23:41 +13:00
en_deprecated_style.yml added support for localized state names (on a class level, like Record.aasm.states.map(&:localized_name)) 2012-12-27 10:23:41 +13:00
schema.rb supporting ActiveRecord transactions when firing an event 2012-10-24 21:03:09 +13:00
spec_helper.rb moved all test models into their own file to improve readibility 2011-09-16 16:57:23 +02:00