[rspec-users] Test for a gem/plugin?
lists at ruby-forum.com
Thu Dec 11 15:12:17 EST 2008
Pat Maddox wrote:
>> Scenario: Application has known users
>> Given that the application has users
>> When the user signs on
>> Then the user is authenticated
> (Where's the business value (I totally made that up, but I'm gonna stick
> with it :))
I like it too. That said, regulatory compliance and financial security
are two that come to mind. And, yes, I and my users consider that both
represent real business value.
I am not trying to put forth a design philosophy. I am trying to
discover what techniques experienced BDD practitioners consider useful
and what they do not. My ignorance may lead me into astoundingly poor
conclusions at times but, I am willing to bear the resulting ridicule if
in the process I learn that which I should have realized. Fortunately,
ridicule has been noteworthy by its absence and the knowledge revealed
by respondents quite illuminating.
I am beginning to see that there exists a wide range of acceptable
practices gathered under the rubric of BDD. At the beginning I acquired
the idea that step definitions were tied to feature steps N:1. Now I
gather, perhaps incorrectly, that step definitions might replace
discrete tests/specifications in frameworks like TestUnit and RSpec
without the need for a directly corresponding feature step, N:N where N
Maybe that is my problem. Perhaps I am trying too hard to use features
for everything. I really do not want to scatter my tests over hell's
half acre. I do not wish to have some tests under ./test, others under
./spec and still others under ./features. I do not want to have three
different rake tasks to run all the tests. I do not want to integrate
rcov results from one test suite with the results from another. I do
not wish to expend time on integrating test suites with one another.
So, given all of these desires, perhaps I am considering features in a
way that is considerably less than optimal. On the other hand, given
that the rspec and testunit matchers are available in step definitions,
is there any harm in using step definitions in place of specs and unit
tests? In the absence of any other method, one could imagine I suppose
a feature step that simply invokes that portion of the step definitions
test suite that is not tied otherwise to any other feature step.
Posted via http://www.ruby-forum.com/.
More information about the rspec-users