spec/spec_helper.rb in eventus-0.2.0 vs spec/spec_helper.rb in eventus-0.3.0
- old
+ new
@@ -9,5 +9,20 @@
Dir[File.join(File.dirname(__FILE__), 'support', '*.rb')].each { |d| require d }
RSpec.configure do |config|
config.mock_with :rspec
end
+
+def create_commit(id, start, *bodies)
+ if bodies[0].is_a? Range
+ bodies = bodies[0]
+ end
+ bodies.each.with_index(start).map do |b, i|
+ {
+ 'name' => 'cereal',
+ 'body' => b,
+ 'time' => Time.now.utc.iso8601,
+ 'sid' => id,
+ 'sequence' => i
+ }
+ end
+end