features/step_definitions/server_steps.rb in middleman-sprockets-4.0.0.rc.2 vs features/step_definitions/server_steps.rb in middleman-sprockets-4.0.0.rc.3
- old
+ new
@@ -8,9 +8,18 @@
Given /^the file "([^\"]*)" content is changed to\:$/ do |name, content|
step %Q{a file named "#{name}" with:}, content
sleep 1
system "touch #{File.join(ENV['MM_ROOT'], name)}"
+ step %Q{the filesystem is polled}
+end
+
+Then /^the filesystem is polled$/ do
+ if @server_inst.files.respond_to?(:poll_once!)
+ @server_inst.files.poll_once!
+ elsif @server_inst.files.respond_to?(:find_new_files!)
+ @server_inst.files.find_new_files!
+ end
end
Then /^sprockets paths should include "([^\"]*)"$/ do |path|
sprockets = @server_inst.extensions[:sprockets].environment
expect( sprockets.paths ).to include File.join(ENV['MM_ROOT'], path)