spec/integration/relaxdb_persistence_spec.rb in davidlee-state-fu-0.3.1 vs spec/integration/relaxdb_persistence_spec.rb in davidlee-state-fu-0.10.0
- old
+ new
@@ -6,10 +6,13 @@
before(:all) do
prepare_relaxdb()
end
before(:each) do
+ if skip_slow_specs?
+ skip_slow_specs and return false
+ end
skip_unless_relaxdb()
reset!
make_pristine_class( 'ExampleDoc', RelaxDB::Document )
end
@@ -22,11 +25,11 @@
describe "when the :field_name is a RelaxDB property" do
before do
ExampleDoc.class_eval do
property :property_field
- machine :field_name => "property_field" do
+ state_fu_machine :field_name => "property_field" do
# ...
end
end
@obj = ExampleDoc.new
end
@@ -37,11 +40,11 @@
end
describe "when the :field_name is not a RelaxDB property" do
before do
ExampleDoc.class_eval do
- machine :field_name => "not_a_property" do
+ state_fu_machine :field_name => "not_a_property" do
# ...
end
end
@obj = ExampleDoc.new
end
@@ -62,10 +65,10 @@
skip_unless_relaxdb()
reset!
make_pristine_class( 'ExampleDoc', RelaxDB::Document )
ExampleDoc.class_eval do
property :state_fu_field
- machine do
+ state_fu_machine do
state :hungry do
event :eat, :to => :satiated
end
end # machine
end # class_eval