lib/picolena/templates/spec/spec_helper.rb in picolena-0.2.0 vs lib/picolena/templates/spec/spec_helper.rb in picolena-0.2.2
- old
+ new
@@ -9,9 +9,18 @@
File.open(file,'w'){|might_have_been_modified|
might_have_been_modified.write content
}
end
+
+class Document
+ def self.find_by_extension(ext)
+ Finder.new("ext:#{ext}").matching_documents.first
+ end
+end
+
+
+## Rspec-rails assume that everybody uses ActiveRecord, but that's not Picolena's case.
module Spec
module Matchers
class Change
alias_method :evaluate_value_proc, :evaluate_value_proc_without_ensured_evaluation_of_proxy
end