Skip to content

Commit

Permalink
Slugged status test fix for alternate ORMs
Browse files Browse the repository at this point in the history
* Allow find_method to be specified.

Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
  • Loading branch information
myabc authored and norman committed Sep 12, 2010
1 parent fb7e3d0 commit 72cdf9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/friendly_id/test.rb
Expand Up @@ -286,7 +286,7 @@ module SluggedStatus

[:record, :name].each do |symbol|
test "should have #{symbol} after find using friendly_id" do
instance2 = klass.find(instance.friendly_id)
instance2 = klass.send(find_method, instance.friendly_id)
assert_not_nil instance2.friendly_id_status.send(symbol)
end
end
Expand Down
5 changes: 4 additions & 1 deletion test/active_record_adapter/slugged_status_test.rb
Expand Up @@ -18,8 +18,11 @@ def instance
@instance ||= klass.create! :name => "hello world"
end

def find_method
:find
end

end
end
end
end

0 comments on commit 72cdf9c

Please sign in to comment.