mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
fix tests for Redis persistence
This commit is contained in:
parent
089e6d9807
commit
b80f4d156b
3 changed files with 6 additions and 3 deletions
3
Gemfile
3
Gemfile
|
@ -17,4 +17,7 @@ gem 'sequel'
|
|||
# gem 'mongo_mapper', '~> 0.13'
|
||||
# gem 'bson_ext', :platforms => :ruby
|
||||
|
||||
# uncomment if you want to run specs for Redis persistence
|
||||
# gem "redis-objects"
|
||||
|
||||
gemspec
|
||||
|
|
|
@ -44,8 +44,8 @@ module AASM
|
|||
# NOTE: intended to be called from an event
|
||||
#
|
||||
# This allows for nil aasm states - be sure to add validation to your model
|
||||
def aasm_read_state
|
||||
state = send(self.class.aasm.attribute_name)
|
||||
def aasm_read_state(name=:default)
|
||||
state = send(self.class.aasm(name).attribute_name)
|
||||
|
||||
if state.value.nil?
|
||||
nil
|
||||
|
|
|
@ -72,6 +72,6 @@ describe 'redis' do
|
|||
end
|
||||
|
||||
rescue LoadError
|
||||
puts "Not running Sequel specs because sequel gem is not installed!!!"
|
||||
puts "Not running Redis specs because sequel gem is not installed!!!"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue