<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -177,6 +177,11 @@ module ScottBarron                   #:nodoc:
           read_inheritable_attribute(:states).keys
         end
         
+        # Returns an array of all known events.
+        def state_events
+          read_inheritable_attribute(:event_table).keys
+        end
+        
         # Define an event.  This takes a block which describes all valid transitions
         # for this event.
         #</diff>
      <filename>lib/acts_as_state_machine.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,6 +40,13 @@ class ActsAsStateMachineTest &lt; Test::Unit::TestCase
     end
   end
   
+  def test_state_events_were_set
+    [:new_message, :view, :reply, :close, :junk, :unjunk].each do |e|
+      assert Conversation.state_events.include?(e)
+    end
+    assert_equal 6, Conversation.state_events.size
+  end
+  
   def test_event_methods_created
     c = Conversation.create
     %w(new_message! view! reply! close! junk! unjunk!).each do |event|</diff>
      <filename>test/acts_as_state_machine_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>103b4b03f88e83f354f64972c95b849b41ebc52b</id>
    </parent>
  </parents>
  <author>
    <name>Michael Murray</name>
    <email>mdmurray@gmail.com</email>
  </author>
  <url>http://github.com/sudothinker/acts_as_state_machine/commit/5a4cee3508f7a183925270d5b31ed135e258a234</url>
  <id>5a4cee3508f7a183925270d5b31ed135e258a234</id>
  <committed-date>2009-03-05T10:16:07-08:00</committed-date>
  <authored-date>2009-03-05T10:16:07-08:00</authored-date>
  <message>Adding method to get a list of events</message>
  <tree>e651cdd06c196400c6b623ca48cbc3a2c3826256</tree>
  <committer>
    <name>Michael Murray</name>
    <email>mdmurray@gmail.com</email>
  </committer>
</commit>
