spec/spec_helper.rb in danger-todoist-1.0.1 vs spec/spec_helper.rb in danger-todoist-1.1.0

- old
+ new

@@ -52,11 +52,11 @@ } end # A stubbed out Dangerfile for use in tests def testing_dangerfile - env = Danger::EnvironmentManager.new(testing_env) + env = Danger::EnvironmentManager.new(testing_env, testing_ui) Danger::Dangerfile.new(env, testing_ui) end def failures @dangerfile.status_report[:errors] @@ -66,6 +66,14 @@ @dangerfile.status_report[:warnings] end def markdowns @dangerfile.status_report[:markdowns].map(&:message) +end + +def sample_diff(patch) + Git::Diff::DiffFile.new( + "base", + path: "some/file.rb", + patch: patch + ) end