<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sat May 25 14:49:33 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/CLJ-840/CLJ-840.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CLJ-840] Add a way to access the current test var in :each fixtures for clojure.test</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-840</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When looking at (log) output from tests written with clojure.test, I would like to be able to identify the output associated with each test. A mechanism to expose the current test var within an :each fixture would enable this.&lt;/p&gt;

&lt;p&gt;One mechanism might be to bind a &lt;b&gt;test-var&lt;/b&gt; var with the current test var before calling the each-fixture-fn in clojure.test/test-all-vars.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14636">CLJ-840</key>
            <summary>Add a way to access the current test var in :each fixtures for clojure.test</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Sep 2011 11:20:56 -0500</created>
                <updated>Fri, 18 Jan 2013 09:47:53 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26912" author="stuart.sierra" created="Fri, 7 Oct 2011 16:33:31 -0500"  >&lt;p&gt;Or just pass the Var directly into the fixture. Vars are invokable.&lt;/p&gt;</comment>
                    <comment id="26913" author="hugoduncan" created="Fri, 7 Oct 2011 16:45:05 -0500"  >&lt;p&gt;I don&apos;t think that works, since the the function passed to the fixture is not the test var, but a function calling &lt;tt&gt;test-var&lt;/tt&gt; on the test var.&lt;/p&gt;</comment>
                    <comment id="27082" author="hugoduncan" created="Fri, 21 Oct 2011 22:34:24 -0500"  >&lt;p&gt;Patch to add &lt;b&gt;test-var&lt;/b&gt;&lt;/p&gt;</comment>
                    <comment id="27090" author="stuart.sierra" created="Tue, 25 Oct 2011 18:04:52 -0500"  >&lt;p&gt;&lt;tt&gt;&amp;#42;testing-vars&amp;#42;&lt;/tt&gt; already has this information, but it&apos;s not visible to the fixture functions because it gets bound inside &lt;tt&gt;test-var&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Perhaps the &lt;tt&gt;:each&lt;/tt&gt; fixture functions should be called in &lt;tt&gt;test-var&lt;/tt&gt; rather than in test-all-vars. (The namespace of a Var is available in its metadata.) But then we have to call &lt;tt&gt;join-fixtures&lt;/tt&gt; inside &lt;tt&gt;test-var&lt;/tt&gt; every time.&lt;/p&gt;</comment>
                    <comment id="27092" author="stuart.sierra" created="Tue, 25 Oct 2011 18:26:51 -0500"  >&lt;p&gt;Try this patch: clj840-2.diff.&lt;/p&gt;

&lt;p&gt;This makes &lt;tt&gt;&amp;#42;testing-vars&amp;#42;&lt;/tt&gt; visible to &lt;tt&gt;:each&lt;/tt&gt; fixture functions, which seems intuitively more correct.&lt;/p&gt;

&lt;p&gt;BUT it slightly changes the behavior of &lt;tt&gt;test-var&lt;/tt&gt;, which I&apos;m less happy about.&lt;/p&gt;</comment>
                    <comment id="27094" author="hugoduncan" created="Tue, 25 Oct 2011 20:07:27 -0500"  >&lt;p&gt;Might it make sense to provide a function on top of &lt;tt&gt;&lt;b&gt;testing-vars&lt;/b&gt;&lt;/tt&gt; to return the current test-var?&lt;/p&gt;</comment>
                    <comment id="27177" author="stuart.sierra" created="Fri, 28 Oct 2011 09:14:58 -0500"  >&lt;p&gt;No, that function is &lt;tt&gt;first&lt;/tt&gt;&lt;/p&gt;</comment>
                    <comment id="27178" author="hugoduncan" created="Fri, 28 Oct 2011 11:31:05 -0500"  >&lt;p&gt;I agree with having the dynamic vars as part of the extension interface, but would have thought that having a function for use when writing tests would have been cleaner. Just my 2c.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10495" name="add-test-var.diff" size="2970" author="hugoduncan" created="Fri, 21 Oct 2011 22:34:24 -0500" />
                    <attachment id="10497" name="clj840-2.diff" size="2366" author="stuart.sierra" created="Tue, 25 Oct 2011 18:26:51 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>
</channel>
</rss>