Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring up-to-date w/ current Midje, cljs #7

Open
wants to merge 240 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
c5213ac
[Issue #82] first version of formula: only reports 0-1 times per form…
Feb 19, 2012
c215fb9
[Issue #82] removed unused code
Feb 19, 2012
8621c2c
[Issue #82] adding backlog file for the formula epic
Feb 19, 2012
823a323
[Issue #82] now reports the first failure's normal report
Feb 19, 2012
6b91789
[Issue #82] formula can now take an optional docstring
Feb 19, 2012
923d921
[Issue #82] first version of formula: only reports 0-1 times per form…
Feb 19, 2012
c35b835
[Issue #82] removed unused code
Feb 19, 2012
e2ce67a
[Issue #82] adding backlog file for the formula epic
Feb 19, 2012
12b9205
[Issue #82] now reports the first failure's normal report
Feb 19, 2012
725c2a2
[Issue #82] formula can now take an optional docstring
Feb 19, 2012
fdae82b
[Issue #82] updating formulas backlog
Feb 19, 2012
a6fb2df
Merge branch 'formulas' of github.com:marick/Midje into formulas
Feb 19, 2012
a75b451
[Issue #82] no longer counts failures as 2 fact runs.
Feb 19, 2012
1bb5b25
[Issue #82] work in progress
Feb 22, 2012
2d8b0e9
Merge branch 'master' into formulas
Feb 22, 2012
a82dd59
Merge branch 'master' into formulas
Feb 23, 2012
8a30cfa
Revert "[Issue #82] work in progress"
Feb 25, 2012
4eb5fcf
workin progress to get formulas to be mergeable into master ready.
Feb 25, 2012
0662e5d
[Issue #82] fixed formulas so that they evaluate their generators, an…
Feb 25, 2012
b091945
[Issue #82] adjustments after checking vs all versions of clojure
Feb 25, 2012
72af5b1
[Issue #82] more ideas added to the formula backlog
Feb 25, 2012
915733b
[Issue #82] rollback dynamic bindability of number of fact generation…
Feb 25, 2012
0dec369
Merge branch 'master' into formulas
Feb 25, 2012
dd4bd47
added an UNRELEASED section to HISTORY.md - I've been adding to this …
Feb 25, 2012
4903b63
extract util fn to handle pulling optional docstrings from macros' ar…
Feb 25, 2012
da688e2
created midje.util ns for code that helps test private vars
Feb 25, 2012
570a95c
updating HISTORY.md after deploy to clojars
Feb 25, 2012
a08f190
[Issue #75] first step: batch all incorrect call count errors in one …
Feb 26, 2012
2eb70b2
[Issue #75] changing report wording to be match the style shown on th…
Feb 26, 2012
4178d00
[Issue #75] added the expected times called to the report
Feb 26, 2012
edd89b3
fixed the doc-string for formula
Feb 26, 2012
7212987
chopped some code off of `rotations`
Feb 27, 2012
c901734
removed the colons from FAIL: and WORK TO DO: in the report
Feb 27, 2012
5438a01
now if you expect :times 10 but there are no calls to that fake, then…
Feb 27, 2012
50c8b63
[Issue #82] adding syntax validations for formula macro
Feb 29, 2012
a0c17ce
[Issue #82] syntax error if less than 2 elements in the binding
Feb 29, 2012
e19bd2f
[Issue #82] generations per formula is now dynamically rebindable
Feb 29, 2012
a542061
upgrading compatibility test files
Feb 29, 2012
125e766
[Issue #82] improving documentation and the backlog
Feb 29, 2012
b8181be
[Issue #82] validates that num generations var is bound to number >= 2
Mar 1, 2012
1247423
[Issue #82] removed test.generative -- its not 1.2.1 compatible
Mar 1, 2012
988b8a5
[Issue #82] refactored such that last fact done in formula is just a …
Mar 1, 2012
a9286d3
[Issue #82] updated backlog with new insights
Mar 2, 2012
ba89d85
[Issue #82] once a formula detects a failure, won't run any more gene…
Mar 2, 2012
9980189
[Issue #82] updated backlog; organized t-formula
Mar 2, 2012
4149811
[Issue #82] formulas can eb set to 1 or more generations now, not 2 o…
Mar 2, 2012
32db60a
[Issue #82] try block is a little more stable
Mar 3, 2012
064624b
[Issue #82] updating backlog
Mar 3, 2012
259f02f
fixed bug where we weren't pr-str :Expected, just calling str on it; …
Mar 4, 2012
cfabcb3
reverting back to using str not pr-str, because pr-str was printing w…
Mar 4, 2012
9319b66
slight tweak to history
Mar 4, 2012
b0525b7
introduced kibit, a static code analyzer; used it to clean a few things
Mar 4, 2012
4a0d548
Better documentation of current behavior.
marick Mar 4, 2012
c793a08
More helpful failures from `unfinished`
marick Mar 4, 2012
268c73f
Slightly more clear test.
marick Mar 4, 2012
cf8f933
Merge branch 'master' of github.com:marick/Midje
marick Mar 4, 2012
8a7fbde
cleanups. Found another use for def-many-methods
Mar 5, 2012
784e842
cleanups. Found some more uses for def-many-methods
Mar 5, 2012
9d51a6b
assorted cleanups, and added test cases
Mar 6, 2012
8cfd8a4
work in progress
Mar 7, 2012
7c495f3
Added unfinished message work to UNRELEASED section of HISTORY.md
Mar 8, 2012
e4dd39a
[Issue #82] updated formula backlog
Mar 9, 2012
91d1a59
[Issue #82] added fact covering simple use of `provided` in a formulas
Mar 9, 2012
08e57ec
[Issue #82] bunch of partial work
Mar 9, 2012
3300081
my first fnil -- and it feels GOOD.
Mar 10, 2012
a33c648
upgraded kibit, and found a couple little kibbles and bits to tweak.
Mar 10, 2012
63caa78
upgraded 1.4 version to beta4; updated HISTORY to reflect that recent…
Mar 10, 2012
d0a4fe3
removed unneeded facts, and cleaned them a bit
Mar 10, 2012
45c67e4
work in progress
Mar 7, 2012
d0165f2
[Issue #82] updated formula backlog
Mar 9, 2012
c77598e
[Issue #82] added fact covering simple use of `provided` in a formulas
Mar 9, 2012
6071991
[Issue #82] bunch of partial work
Mar 9, 2012
2a6db5c
[Issue #82] dynamic binding of *num-generations-per-formula* works again
Mar 11, 2012
b835d32
[Issue #82] fixing shrinking to happen at runtime not macroexpand time
Mar 11, 2012
8a81916
[Issue #82] pulled duplicated code into private fn
Mar 11, 2012
8bd6bca
[Issue #82] formulas only allow one check per formula
Mar 11, 2012
cfd497d
[Issue #82] formulas can have multiple bindings that each can be shru…
Mar 13, 2012
1ae1ad3
[Issue #82] updates to formula backlog
Mar 13, 2012
3fac4a0
cleaning up tests of syntax validations by making a testing macro tha…
Mar 13, 2012
f8abb7c
[Issue #82] arrows in against-background in a formula are ignored whe…
Mar 13, 2012
57ed06c
[Issue #82] a lot more syntax validations for formula
Mar 14, 2012
df6caf7
[Issue #82] added notion of a future-formula/pending-formula/incipien…
Mar 15, 2012
968f636
renames and cleanups etc.
Mar 15, 2012
d6c488a
[Issue #82] added opt-map to formulas with :num-trials key to specify…
Mar 15, 2012
0b44a64
[Issue #82] renamed *num-generations-per-formula* -> *num-trials*
Mar 15, 2012
e81ea73
[Issue #82] validate that only valid opt-map keys is :num-trials
Mar 15, 2012
5906a1d
[Issue #82] validate that :num-trials can only be set to 1+
Mar 15, 2012
a0caf34
[Issue #82] added one more validation case taking the opts-map into a…
Mar 15, 2012
3fd895f
[Issue #82] added opts-map? to :arglists and docstring
Mar 15, 2012
563e76d
[Issue #82] 'or' makes for cleaner code
Mar 15, 2012
cf45797
[Issue #82] better test case
Mar 15, 2012
b045e50
Added future-fact with a =streams=> regression.
marick Mar 15, 2012
d83400d
[Issue #82] use valid-let over when-valid
Mar 17, 2012
fff931e
[Issue #82] clarifying renames
Mar 17, 2012
74effe7
[Issue #82] clarifying renames - part #2
Mar 18, 2012
df51fa7
[Issue #82] introduce fn pop-opts-map
Mar 18, 2012
fe606d8
corrected doc-string
Mar 18, 2012
79b122b
pulled out higher order pop-if fn to use in pop-docstring and pop-opt…
Mar 18, 2012
ffc42a1
valid-let over when-valid + let
Mar 18, 2012
3fd3230
A more complete lazy streams implementation. Imperfectly tidy.
marick Mar 18, 2012
6dfc00b
Clean up previous checkin
marick Mar 19, 2012
f56a011
merge
marick Mar 19, 2012
6d9f6e7
[Issue-#82] broadened test to cover two bindingvars that both shrink.
Mar 19, 2012
e68a559
breaking up `fail-at` to hopefully make it more readable.
Mar 19, 2012
47265ca
[Issue-#82] riffing on the idea of making t-formulas more of an as-do…
Mar 19, 2012
45e17d2
updated-rhs: use `seq` case instead of `reader-list-form?` & `string?`
Mar 19, 2012
83f7deb
Demonstrating that lazy =streams=> doesn't work for `throws`.
marick Mar 19, 2012
6fcf820
fixed metadata issue with midje.util's functions
Mar 20, 2012
7af3b78
Merge pull request #116 from dnaumov/master
Mar 20, 2012
8091c69
thought that `format` was easier to read than a long `str` concatted …
Mar 20, 2012
d4d01bb
[Issue #82] `with-num-trials` provides a nice syntax for multiple for…
Mar 21, 2012
a8e84e1
cleaning up metaconstant code
Mar 21, 2012
154c31e
Update README.md
Mar 22, 2012
c070c0a
[Issue #117] Quoted fact inappropriately being given :position k/v pair
Mar 24, 2012
7468018
[Issue #117] arrows inside quoted forms will not have :position info …
Mar 24, 2012
faaec1c
[Issue #117] moved fact to a more appropriate file
Mar 24, 2012
9a053f0
[Issue #118] added dynamic var to hook into the unprocessed-checks an…
Mar 24, 2012
f8d2374
[Issue #118] added description key to unprocessed-check. Makes more i…
Mar 25, 2012
d9c244a
[Issue #118] :description in unprocessed-check is a vector of strings…
Mar 25, 2012
a41f59e
[Issue #118] unprocessed-check now includes :call-form and :arrow key…
Mar 25, 2012
66fd794
[Issue #118] maps produced by fake and data-fake now include :call-fo…
Mar 25, 2012
c95fa86
[Issue #82] min length of all shrunken cases seqs determines how many…
Mar 26, 2012
b7acaa9
[Issue #82] missed a comment
Mar 26, 2012
11f440f
used set-m monad as essentially a more efficient `for` expression tha…
Mar 28, 2012
fcf3c7e
[Issue #119] moved *expect-checking-fn* to semi-sweet.
Mar 31, 2012
c655fbe
assorted validation-error cleanups
Mar 31, 2012
fe0add2
removed valid-let in favor of using domonad syntax-validate-m directl…
Mar 31, 2012
a79fed1
wrote when-valid in terms of (domonad syntax-validate-m ...)
Mar 31, 2012
fc0d87e
renamed to be the report FORM, since it reutrns a thunked form, it do…
Mar 31, 2012
565fddf
removed tests of private fn that are covered elsewhere
Mar 31, 2012
3fa6a15
cleanups
Mar 31, 2012
37ca7c0
renames/cleanups
Mar 31, 2012
89dd7b4
cleanup of fakes.clj... reducing the private function load, to reduc…
Mar 31, 2012
1e7b369
namespace qualified a keyword
Mar 31, 2012
82f06f0
removed unneeded :testable metadata
Mar 31, 2012
e9995da
renamed fake key :lhs to :var and inlined private fn
Apr 1, 2012
a1c7043
cleanups
Apr 1, 2012
7e4f176
renames, which enable removing a small function
Apr 1, 2012
4e4f9ed
simplified best-call-action finding code
Apr 1, 2012
24293ac
more cleaning renaming and condensing of fakes.clj
Apr 1, 2012
b2ab011
missed this rename from last commit
Apr 1, 2012
8afef24
more cleanups
Apr 1, 2012
a881a95
cleanups
Apr 1, 2012
33e5ee1
added failing future-fact around the thunked =streams=> work
Apr 1, 2012
d18ea10
upgraded to Kibit 0.0.3
Apr 2, 2012
792ba0f
reformatted ns macro calls
Apr 3, 2012
8a087d1
use only the monad... no need for when-valid too
Apr 4, 2012
9cad336
no longer deconstructing tables twice.
Apr 4, 2012
7c11e2f
removed all the squares
Apr 4, 2012
93974b8
don't need `;; -*- indent-tabs-mode: nil -*-` any longer!
Apr 4, 2012
8639ea3
dropped the syntax- prefix to validation stuff
Apr 4, 2012
92654d1
comments; core.match; cleanups
Apr 5, 2012
068aff1
simpler `rotations`
Apr 5, 2012
cf2f0f1
created `reporting` package for core reporting code and for various a…
Apr 9, 2012
db95a49
[Issue #121] added mostly-empty empty namespace for junit xml report …
Apr 9, 2012
8e4e78f
cleanups for readability
Apr 12, 2012
ef76ec1
Don't need 'is-' prefix on preds
Apr 12, 2012
1838ff1
making against-background wrapping code easier to follow
Apr 12, 2012
b2fd759
[Issue #121] created report configuration map to use for reporting fa…
Apr 13, 2012
cee76cb
Doc-strings are no longer ignored, but are instead reported.
Apr 13, 2012
565c6ca
[Issue #121] added a map of formatters
Apr 14, 2012
a0ed60c
upgrade to clojure 1.4.0
Apr 15, 2012
58c3fee
added clojure 1.5.0-SNAPSHOT to :multi-deps, to test against
Apr 15, 2012
d37f75d
added checker combinators: every-checker and some-checker
Apr 20, 2012
ad01eb2
Document that all regexps must match in `throws`
marick Apr 20, 2012
09cd7c7
Change names to clarify that chatty-falsehood is of more general scope.
marick Apr 21, 2012
2a37acf
Give the idea of extended-falsehood its own namespace
marick Apr 21, 2012
848cf52
`throws` checker obeys Midje's extended-false?
marick Apr 22, 2012
56089ba
data-laden-falsehoods keep the metadata of the value they are created…
Apr 22, 2012
bc645c4
added linter, Eastwood, and used it to mark unused fn args with _'s a…
Apr 22, 2012
416a327
fixed this non-backwards compatible fn call
Apr 22, 2012
6fee282
marked some unused params with underscores
Apr 22, 2012
8ddfba8
removed a couple of reflection warnings that snuck back
Apr 22, 2012
208306b
checker combinators work w/ `extended-false?` and thus chatty-checkers
Apr 22, 2012
79612e9
lookup fact report fn later, now rebinding formatter works correctly
Apr 22, 2012
ebf518a
[Issue #121] removed unnecessary test clutter
Apr 22, 2012
fda492d
moved extended-fn? to util ns
Apr 23, 2012
9a336d1
cleanup code to validate seqs of forms
Apr 23, 2012
1c4025f
can use `lein midje --lazytest` from time to time now
Apr 23, 2012
d57e67a
Added lazytest repo
marick Apr 23, 2012
d906f5a
Document how to write checkers (including chatty checkers)
marick Apr 23, 2012
63cc307
and voila! Reporting works once again.
Apr 23, 2012
45be94c
[Issue #98] stop thunking the rhs of =streams=>
Apr 23, 2012
01d2a02
Merge branch 'master' of github.com:marick/Midje
marick Apr 24, 2012
0af9f25
Bit of generalization (and fix to bad checker)
marick Apr 24, 2012
fbb556e
Issue 94: stack overflow when a prerequisite uses `deref'
marick Apr 24, 2012
6a48173
Test for prerequisites using `deref` was wrong
marick Apr 24, 2012
317c818
Introduce the notion of function references that can be either symbol…
marick Apr 24, 2012
294afe2
Remove (var) references work, except for folded prerequisites.
marick Apr 24, 2012
d493fce
Finished allowing vars as well as symbols to be mocked out.
marick Apr 24, 2012
a6de0a3
Bump version to 1.4.0-SNAPSHOT
marick Apr 25, 2012
621fe08
Issue: #76 fixed by killing core.match in this file.
marick Apr 25, 2012
51a23de
[Issue #76] removed use of core.match
Apr 25, 2012
9a3b7c4
Added extended-true?
marick Apr 26, 2012
9c876c8
Moved the combining checkers into their own file.
marick Apr 26, 2012
e789c31
merge
marick Apr 26, 2012
54d7aec
ordered no longer limits us to Clojure 1.3
marick Apr 26, 2012
856d6e4
Short-circuiting every-checker
marick Apr 26, 2012
34be584
Made some-checker short-circuit
marick Apr 26, 2012
2cb4049
chatty-checkers are no longer special
marick Apr 26, 2012
4577c08
Add some tests for actual report output
marick Apr 26, 2012
f774acf
Split file in two; consolidate support code.
marick Apr 26, 2012
322ee9a
`throws` checker should not spew its guts when given non-throwable
marick Apr 26, 2012
b13e23a
Remove stray print statement
marick Apr 26, 2012
0a97d6b
Put the history into the wiki
marick Apr 27, 2012
8b1472b
Issue: #76 Added `metaconstants` macro to predeclare metaconstants.
marick Apr 27, 2012
b9b53c7
Issue: #131 Exclude dependencies on Clojure. Now works with 1.4.
marick Apr 27, 2012
e7de9fc
Issue: #132 Delete examples.
marick Apr 27, 2012
81498d1
Delete what's no pointless.
marick Apr 27, 2012
410c477
1.4.0-beta1 readme
marick Apr 27, 2012
f97b9bb
Bumped to 1.4.0-beta1 and pushed to clojars
marick Apr 27, 2012
3f9010f
use condp instead of lookup in a map
Apr 29, 2012
3502023
Revert "use condp instead of lookup in a map" I swear this passed the…
Apr 29, 2012
6e01e6f
kept dispatch fn 'open' by using def-many-methods
Apr 29, 2012
c255a95
use condp instead of map lookup - attempt 2
Apr 29, 2012
6f0b38b
Links to tutorial
marick May 1, 2012
7c43840
Forgot spaces
marick May 1, 2012
0504a50
No more downloads directory
marick May 1, 2012
a4b3be1
Bump to 1.5. Any 1.4 changes will go on 1.4 branch
marick May 1, 2012
ed74a31
Allow t-sweet to run in isolation.
marick May 1, 2012
6133cff
These tests had prerequisites that were never actually used.
marick May 1, 2012
98ac314
Configuration switch to turn on default prerequisites.
marick May 1, 2012
67a363f
Merge branch '1.4'
marick May 1, 2012
748a6f0
Comment out "1.5.0" dependency set until there's something for it to …
marick May 5, 2012
d61bb23
Work around an oddity of (only) Clojure 1.3.
marick May 5, 2012
6bf6c6d
Bump official version to beta-2
marick May 5, 2012
32bd3c7
bump dev version to RC1
marick May 9, 2012
07c9f9a
starting to think through replacement for background
marick May 10, 2012
a87acf1
more fiddling
marick May 11, 2012
607a97b
bump versions in README
marick May 11, 2012
0aef976
Report an error for prerequisites on private fns
gregspurrier Jun 15, 2012
3227f2b
Make the error message more helpful
gregspurrier Jun 15, 2012
9ebfa44
Merge pull request #141 from gregspurrier/master
marick Jun 15, 2012
36f2c4c
Add Greg Spurrier to contributors list
marick Jun 15, 2012
e2d559c
Have `testable-privates` mark interned vars for error checking.
marick Jun 15, 2012
7553b02
Documentation tests for testing privates.
marick Jun 15, 2012
fb7de6b
Wording tweak
marick Jun 15, 2012
c989ddb
Document an inelegant failure to be fixed
marick Jun 15, 2012
5b4469d
Some thoughts about a replacement for background prerequisites.
marick Jun 15, 2012
7283681
Attempt to merge cljs branch w/ current midje
charles-dyfis-net Jul 16, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Issue marick#121] added a map of formatters
Alex Baranosky committed Apr 14, 2012
commit 565c6cae062f6f89372091eb807ff486ad2a3450
16 changes: 14 additions & 2 deletions src/midje/ideas/reporting/junit_xml_format.clj
Original file line number Diff line number Diff line change
@@ -2,6 +2,18 @@
midje.ideas.reporting.junit-xml-format)


(defmulti report-junit-xml :type)
(defmulti report-junit-xml :type
)

(defmethod report-junit-xml :default [m] )
(defmethod report-junit-xml :default [m]
;; code to create XML for the different types of failure report maps
;; see string-format.clj for inspiration
)

(defn report-junit-xml-summary [exit-after-tests?]
;; code to create XML for summary of failed facts
;; see string-format.clj for inspiration
)

(def junit-xml-format-config { :single-fact-fn report-junit-xml
:summary-fn report-junit-xml-summary })
6 changes: 5 additions & 1 deletion src/midje/ideas/reporting/report.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
(ns ^{:doc "Renders the various reported fact evaluation results."}
midje.ideas.reporting.report
(:use clojure.test
[midje.ideas.reporting.string-format :only [report-strings-format-config]]))
[midje.ideas.reporting.string-format :only [report-strings-format-config]]
[midje.ideas.reporting.junit-xml-format :only [junit-xml-format-config]]))


;;; Configuration
@@ -16,6 +17,9 @@
fns in the configuration map bound to this var."}
*report-format-config* report-strings-format-config)

(def formatters { "default" report-strings-format-config
"junit-xml" junit-xml-format-config })

(def report-single-fact (:single-fact-fn *report-format-config*))


1 change: 0 additions & 1 deletion test/midje/internal_ideas/t_fakes.clj
Original file line number Diff line number Diff line change
@@ -355,7 +355,6 @@ odd? 3 falsey)
second-half {:data-fake true :var #'var-for-merged :contained {:replaced 222, :extra 3}}
irrelevant {:data-fake true :var #'var-for-irrelevant :contained {:retained :FOO :extra :BAR}}
result (binding-map [first-half second-half irrelevant])]
(println (pr-str result))
(.storage (result #'midje.internal-ideas.t-fakes/var-for-merged)) => {:retained 1, :replaced 222, :extra 3}
(.storage (result #'midje.internal-ideas.t-fakes/var-for-irrelevant)) => {:retained :FOO, :extra :BAR}))