1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
Commit graph

20 commits

Author SHA1 Message Date
Thorsten Böttger
461886e394 one file per test model class 2013-04-21 18:43:03 +02:00
Thorsten Böttger
233d99b906 continued to refactor instance methods for AASM objects 2013-02-22 19:15:03 +13:00
Johnny Shields
13e7090d40 Added autocreation of state scopes for Mongoid, including RSpec tests. The interface mirrors the ActiveRecord support for the same.
Summary of changes
- Added the following methods to persistence/mongoid_persistence.rb
  - find_in_state
  - count_in_state
  - with_state_scope (protected in AR, would argue it should be made public there.
  - I did not port calculate_in_state, due to AR vs. Mongoid API differences; I made with_state_scope public instead. (I think it should be public for AR as well.)
- Moved AASM::Base patch which aliases scopes in persistence/active_record_persistence.rb to persistence/base.rb, and added a Mongoid detection clause to the if statement (in addition to AR). Also deleted commented code from the original method.
- Added 'mongoid' as dev dependency to gemspec
- Created two test files (mongoid_persistance_spec.rb and mongoid_models.rb) covering all my changes.
2013-01-07 07:29:35 +09:00
Thorsten Böttger
6160269635 better naming (test classes) 2012-12-02 20:54:58 +13:00
Thorsten Böttger
d8b8d5f5c3 improving tests 2012-12-02 20:51:48 +13:00
Thorsten Böttger
475985f282 started to clean up the specs 2012-11-28 22:42:41 +13:00
Thorsten Böttger
50e335be05 refactored test for complex example 2012-10-26 22:27:17 +13:00
Thorsten Böttger
f4ccee8272 removed test classes from spec itself 2012-10-26 21:52:39 +13:00
Thorsten Böttger
182b5f9313 refactored callbacks tests for old DSL 2012-10-26 21:44:56 +13:00
Thorsten Böttger
c37d92204c added test for callbacks with new DSL 2012-10-26 20:01:16 +13:00
Thorsten Böttger
05d64cdf37 supporting ActiveRecord transactions when firing an event 2012-10-24 21:03:09 +13:00
Stefan Wrobel
afa65d8603 Add ability to set up transitions without specifying from - these will allow transitioning from ANY state 2012-10-18 23:18:03 -07:00
Pascal Zumkehr
1acf14fc3c fix initializer to keep existing options (originating from superclass) 2012-04-02 11:44:53 +02:00
Thorsten Böttger
921cfdad5c ActiveRecord persistence can ignore validation when trying to save invalid models 2012-01-16 17:27:15 +01:00
Thorsten Böttger
8f0ff1b0ab version bump to 3.0.0 (new DSL) 2011-11-26 21:11:57 +01:00
Thorsten Böttger
19275903a2 you may now disable whiny transactions (using the new dsl) 2011-11-26 20:49:46 +01:00
Thorsten Böttger
0a961c122f made sure, old state callbacks are still working with the new dsl 2011-11-25 23:55:56 +01:00
Thorsten Böttger
0d2d9a8006 new dsl, 1st step: providing new dsl, which uses the old one 2011-10-23 21:35:44 +02:00
Thorsten Böttger
766e985158 cleaned up the specs 2011-10-15 17:45:24 +02:00
Thorsten Böttger
31258e7636 unified test and spec (using spec only now) 2011-10-15 17:32:28 +02:00