Skip to content

Commit

Permalink
fix tests for Redis persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
alto committed Mar 19, 2016
1 parent 089e6d9 commit b80f4d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lib/aasm/persistence/redis_persistence.rb
Expand Up @@ -44,8 +44,8 @@ def initialize(*args)
# 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
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/persistence/redis_persistence_spec.rb
Expand Up @@ -72,6 +72,6 @@ def id
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

0 comments on commit b80f4d1

Please sign in to comment.