lib/ajax/rspec/extension.rb in ajax-1.1.5 vs lib/ajax/rspec/extension.rb in ajax-1.1.6
- old
+ new
@@ -1,23 +1,23 @@
module Ajax
module RSpec
module Extension
+ # Enable and unmock
def integrate_ajax
Ajax.enabled = true
+ Ajax.mocked = false
end
+ # Disable
def disable_ajax
Ajax.enabled = false
end
+ alias_method :unmock_ajax, :disable_ajax
+ # Enable and mock
def mock_ajax
- integrate_ajax
+ Ajax.enabled = true
Ajax.mocked = true
end
-
- def unmock_ajax
- disable_ajax
- Ajax.mocked = false
- end
end
end
-end
\ No newline at end of file
+end