[rspec-users] Stub conflict?

2012-04-05 Thread James
* rspec (2.9.0) * rspec-core (2.9.0) * rspec-expectations (2.9.0) * rspec-mocks (2.9.0) * rspec-rails (2.9.0) rails (3.0.4) ruby 1.8.7 Thanks in advance! James ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Stub conflict?

2012-04-05 Thread James
* rspec (2.9.0) * rspec-core (2.9.0) * rspec-expectations (2.9.0) * rspec-mocks (2.9.0) * rspec-rails (2.9.0) rails (3.0.4) ruby 1.8.7 Thanks in advance! James ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] JRuby and RSpec for Rails

2009-09-11 Thread James H
n custom "describe" blocks that informed RSpec that I want to skip them unless RUBY_PLATFORM is set to "java". Does this sound like a reasonable strategy? I'm not really sure how to implement the "skip me if I'm not being run wit

[rspec-users] Future of RSpec Integration Testing

2010-04-29 Thread James H
y're being removed, and RSpec 2 appears to be using Cucumber for integration testing. What's the scoop here? Does the community have any recommendations on the matter? Thank you for your time, James Herdman ___ rspec-users mailing list rspec

Re: [rspec-users] is it Mailing list on github for oauth on twitter

2010-09-19 Thread James Martin
gt; I don't think there's a mailing list specifically for the Abraham library but you might have some luck on the Twitter Developers list: http://groups.google.com/group/twitter-development-talk Thanks, James. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] RSpec-2.0.0 is released!

2010-10-11 Thread James Martin
Congrats on reaching this milestone and many thanks to all who contributed. Your efforts are much appreciated! RSpec2 is a massive improvement over 1 and I'm really enjoying using it. Thanks, James. On Sunday, October 10, 2010, David Chelimsky wrote: > ## RSpec-2.0.0 has been released!

[rspec-users] Rspec not loading .rspec file

2010-11-17 Thread James Cox
Hey, For some reason i can't seem to make rake spec or bin/rspec load the contents of the current working directory's .rspec, nor my ~/.rspec. Is there some kind of incantation required to make this work? Thanks, James -- James Cox, Consultant, Raconteur, Photographer, Entrepreneur

[rspec-users] no such file to load - spec/test/unit

2010-11-25 Thread James Palmer
is a "newb" question, as I'm still fairly new at Ruby and its various gems. Thanks, James -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] no such file to load - spec/test/unit

2010-11-29 Thread James Palmer
Thanks David, I actually had a "require" statement in my code for Test Unit that shouldn't have been there - the problem appears to not have been rspec related at all. Thanks! James -- Posted via http://www.ruby-forum.com/. ___ rspe

[rspec-users] Relish documentation for RSpec

2011-01-27 Thread James Almond
unsure how that fits in with forks and pull requests etc. Thanks! James ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
o use some sort of custom matcher - I am reluctant to do this since this method is called in other cases where maybe (for arguments sake) I DO care about array ordering within the hash. Hope someone can solve this for me - MUCH appreciation. James ___

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
3] ** end* does this sound sensible? Thanks so much again - I have your book :) and although I'm new to it I really enjoy rspec! On Tue, Feb 1, 2011 at 8:51 AM, James OBrien wrote: > ooops, that sent itself early... > > . . . > > there are other entries in the hash so presuma

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
; 1 :ields => :in_the_hash } actual.should =~ [1,2,3] end i.e. I assert :some_key and 'the rest' separately. There isn't a way to do this simpler is there? Thanks again David! On Tue, Feb 1, 2011 at 8:46 AM, James OBrien wrote: > Awesome, thanks David! >

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
: > > On Feb 1, 2011, at 3:40 AM, James OBrien wrote: > > hey, thanks for reading: > > I have a problem which can be reduced to this, > > from within an example of mine I call the helper 'expect_call' which is > defined thus: > > def expect_call(*hash*)* &g

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
c-level tests into the classes themselves as context-sensitive-optionally loaded or not depending on whether you're in testing mode or not Julian On 02/02/2011, at 4:01 AM, James OBrien wrote: > additionally, > > since my > > foo.should_recei...

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
ished theory and best practise. I would like to draw this back to the original question Take care James On Feb 1, 2011 8:16 PM, "Julian Leviston" wrote: Sorry it was a knee-jerk reaction that was prompted by what you wrote, but not necessarily even connected to it. Essentially, I&#x

Re: [rspec-users] array order-agnostic matching?

2011-02-01 Thread James OBrien
I agree Vincent Can people however please use this trail to help me with my original query. I repeat the private method is declared on the test example group. This is not inside implemenraton code. On Feb 1, 2011 9:21 PM, "Wincent Colaiuta" wrote: El 02/02/2011, a las 02:28, Julian Leviston es

[rspec-users] Pull requests via Github - To Fork or Not? That is the Question.

2011-02-10 Thread James Martin
rojects on github, or fork them all and then setup my local development environment from my own forks? If the preferred method is to clone from the official rspec/* repos then it presumably wouldn't be possible to submit pull requests. Thanks, James. [1] https://github.com/rspec/rspec-

Re: [rspec-users] Pull requests via Github - To Fork or Not? That is the Question.

2011-02-10 Thread James Martin
Thanks, David. That makes perfect sense. James. On Fri, Feb 11, 2011 at 1:05 PM, David Chelimsky wrote: > On Feb 10, 2011, at 6:29 PM, James Martin wrote: > > Hi, > > I've been coming up with some documentation examples, which I'd like > to contribute as Cucu

Re: [rspec-users] Current test failing?

2011-02-11 Thread James Martin
I'm trying to imagine a use case (and usage) of this. Could you give me an example of how you would want to write it and what for? On Friday, February 11, 2011, Andrew Wagner wrote: > Is there any way, within a test (e.g., in an after block), to see whether the > test is currently passing, fail

Re: [rspec-users] Controller Specs - undefined local variable or method 'app'

2011-02-12 Thread James Martin
Not 100% sure, but that failure looks suspiciously like something you get when using rack-test; which expects an 'app' method to be defined that returns an instance of your rack-compatible application. On Saturday, February 12, 2011, Doug Bryant wrote: > On one of my projects using rspec 2.5 & ra

[rspec-users] Stubbing Sleep

2011-02-22 Thread James Martin
t the sleep issue to deal with. Thanks, James. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Stubbing Sleep

2011-02-22 Thread James Martin
d_eventually do_what_we_expect And be able to configure the maximum timeout of #should_eventually Anyway, if this looks interesting or helpful for someone else I'll throw it in a Gist. Cheers, James. On Wed, Feb 23, 2011 at 6:37 AM, Michael Guterl wrote: > > > Eric Hodel recentl

Re: [rspec-users] Good tutorial for RSpec With Rails 3

2011-03-10 Thread James Martin
; which you should easily make back when you deploy your first killer Rails app. :-) HTH James. On Thu, Mar 10, 2011 at 10:52 PM, Mohnish J. wrote: > Hi, > > I am looking for a good free tutorial which implements RSpec with Rails > 3. I have found many tutorials which work for

Re: [rspec-users] Trying to test flash messaging with rspec

2011-03-10 Thread James Martin
How about just testing the flash directly, which should be accessible from your test: flash[:success].should =~ /welcome new user/i I've used a case insensitive regex here, which I think captures the intent of your test without being quite so rigid. What do you think? On Fri, Mar 11, 2011 at

[rspec-users] RCov

2011-03-11 Thread James OBrien
I'm using Rake to run my specs e.g. task :test do Rake::Task['spec'].execute end how can I aspect this to include some sort of coverage report - RCov maybe? Of course, I could just escape to the command line with something like system('rcov rspec ') but I prefer to solve this programaticaly si

Re: [rspec-users] [module announcement] Equivalency testing for XML

2011-03-24 Thread James Martin
! Shame it wasn't available a few months ago when I rolled my own! :-) Will take a look through the specs and my own version and if there's any gaps I'll send you a pull request. Cheers, James. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Mocks and CL Programs

2011-04-05 Thread James Martin
On Mon, Apr 4, 2011 at 1:24 AM, andyl wrote: > I am using rspec/aruba to do integration tests of a command-line program > i'm writing. > > ... > > Alternatively, I could write a local web service that delivers fake > results. > > I like the idea of this for end-to-end tests, depending on the com

[rspec-users] Shared context styles

2011-05-12 Thread James Almond
I'm not completely sold on the method name, but what do you think of the style? James --- @JamesAlmond http://jamesalmond.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] rspec and Lion?

2011-07-25 Thread James Cox
ondered if anyone had seen this? thanks, James ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] A recently observed anti pattern: commented out tests

2012-07-23 Thread James Cox
ld compare lines vs lines-commented, and if the percentage was higher than xx, it'd issue some kind of warning? Best, james ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-24 Thread James Cox
s under it :/) so yes, pending is ok, but a second keyword "broken" might be nicer, which would act the same but output different info. -james On Mon, Jul 23, 2012 at 10:58 PM, Adam Sroka wrote: > I haven't posted in a while, but I want to say that as someone who spends a > s

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-26 Thread James Cox
se. It might work to visually make it distinguishable enough to process. :) thanks. -james ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-26 Thread James Cox
Chris, On Tue, Jul 24, 2012 at 4:54 PM, Chris Flipse wrote: > > > On Tue, Jul 24, 2012 at 1:55 PM, James Cox wrote: > >> so yes, pending is ok, but a second keyword "broken" might be nicer, >> which would act the same but output different info.-- >> &

Re: [rspec-users] webrat cannot find label?

2008-11-14 Thread James Byrne
Bart Zonneveld wrote: > On 13-nov-2008, at 20:41, James B. Byrne wrote: > > Are you 100% sure the thing you are selecting exists in the select > box? That has bitten me in the butt a few times.. > > cheers, > bartz This is what Rails generates from the view: Legal

Re: [rspec-users] webrat cannot find label?

2008-11-14 Thread James Byrne
Mike Sassak wrote: > What happens if you remove the b and br tags from within the label and > change the text to "Legal Form" only, without the colon? I get exactly the same behaviour: entities/new ... Legal Form Select the type of entity CORP - Corporation PART -

Re: [rspec-users] Learning Cucumber

2008-11-14 Thread James Byrne
Andrew Premdas wrote: > What you're doing here is writing imperative features. Writing > declarative features might be a better alternative. Instead of ... > > Given I am on the new entity page > When I correctly fill in the new entity form > Then I should see a confirmation > > Then the featur

Re: [rspec-users] webrat cannot find label?

2008-11-14 Thread James Byrne
Barry Mitchelson wrote: > On Thu, Nov 13, 2008 at 7:41 PM, James B. Byrne > <[EMAIL PROTECTED]>wrote: > >> >> On Thu, November 13, 2008 14:02, James B. Byrne wrote: >> >> > >> > What is the correct syntax to test selecting from a range of val

Re: [rspec-users] webrat cannot find label?

2008-11-14 Thread James Byrne
James Byrne wrote: > > I'll be damned... It works. > > Thank you so very much. I would never have connected "option_text" to > the description portion of the list. This is what I ended up with: features/entity.features ... Scenario: Attempt to ADD a VALID en

Re: [rspec-users] More Examples

2008-11-17 Thread James Byrne
Matt Wynne wrote: > On 17 Nov 2008, at 20:33, James B. Byrne wrote: >> >> More Examples: >>| initial | after| >>| "ALL CAPS"| "All Caps" | >>| &

[rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-19 Thread James Byrne
OS=CentOS-5.2 Ruby=1.8.6 Rails=2.2.1_RC Gems all up to date I have been experimenting with autotest and I have a few questions. 1. given export AUTOFEATURES=TRUE if ./test exists (with tests) then these tests are run and the features are not. Is this intended behaviour? 2. given require 'autote

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-19 Thread James Byrne
Ben Mabey wrote: > James Byrne wrote: >> >> > Try doing TRUE in all lowercase. > > -Ben $ set AUTOFEATURE=true BASH=/bin/bash ... -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-20 Thread James Byrne
James Byrne wrote: > OS=CentOS-5.2 > Ruby=1.8.6 > Rails=2.2.1_RC > Gems all up to date > > I have been experimenting with autotest and I have a few questions. > > 1. given: export AUTOFEATURES=true, if ./test exists (with tests) then > these tests are run and the

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-20 Thread James Byrne
Peter Jaros wrote: > In RSpec, if you have failing examples which you don't actually want > to deal with yet, you can make them pending, and Autotest will ignore > the fact that they're not working. I don't think Test::Unit provides > an equivalent feature, though. > > Peter Yes, and no. You c

[rspec-users] Test::Unit Functional failure puzzle

2008-11-20 Thread James Byrne
Not an RSpec question, but I was led to this problem by starting to use autotest with cucumber and so, however unjustly, I feel that RSpec has to shoulder some of the blame. I have a failing test in my clients_controller test and I cannot figure out what is wrong from the information provided from

Re: [rspec-users] Test::Unit Functional failure puzzle

2008-11-23 Thread James Byrne
David Chelimsky wrote: > > Without seeing the controller code, I'd guess that the controller uses > create, and not create! and that a validation failure is not getting > reported anywhere. > > If so, try changing create to create! and you should get your error. > Thank you. You were close eno

Re: [rspec-users] More Examples

2008-11-23 Thread James Byrne
Pau Cor wrote: > James Byrne wrote: >> This is what I see in the console: > The underlining didn't come through in you post, so that doesn't help > us. > > If you post your step matchers, then we can tell you what your columns > need to be. Essentially, for eve

[rspec-users] Spec'ing via features

2008-11-24 Thread James Byrne
As I work with Rails TestUnit tests I am reconsidering how to use cucumber features. It seems to me that it might be best to have a coherent view of how to arrange my test suites before I get much further into this. Now, so far I have considered three possibilities: 1. Use features exclusively.

[rspec-users] calling a step from a step

2008-11-24 Thread James Byrne
cucumber 0.1.9 I have this: When /obtain the party (.*)/ do |n| n case when "common name" @party.entity_name = "Anything will do" when "legal name" @party.entity_legal_name = "Something a Bit Longer I SHOULD think" when "corporate form" @party.entity_legal_form = "

Re: [rspec-users] calling a step from a step

2008-11-24 Thread James Byrne
James Byrne wrote: > When /should determine the party (.*) do |n| > When "obtain the party #{n}" > end > Missed the next follow on lines. Snippet should be: When /should determine the party (.*) do |n| When "obtain the party #{n}" end Then /record th

Re: [rspec-users] calling a step from a step

2008-11-24 Thread James Byrne
James Byrne wrote: > James Byrne wrote: > >> When /should determine the party (.*) do |n| >> When "obtain the party #{n}" >> end >> > Another helpful tidbit that I neglected to post. The reason that I focused on the step from step method shown ab

Re: [rspec-users] calling a step from a step

2008-11-24 Thread James Byrne
Nick Hoffman wrote: > On 2008-11-24, at 11:16, James Byrne wrote: >> I have this: >> >> When /obtain the party (.*)/ do |n| >> n case > > Hi James. Shouldn't that be "case n"? > -Nick Yes. > Missing slash at end of regex > /W

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread James Byrne
James Byrne wrote: > into this. Now, so far I have considered three possibilities: Ok, five... -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Test::Unit Functional failure puzzle

2008-11-24 Thread James Byrne
Matt Wynne wrote: > > Make sense? > Matt Yes. I am afraid that my original post is based upon a naive sense of how things work in this environment. Clearly, whenever one is dealing with human input then the possibility of incomplete, contradictory, or simply wrong data must be accommodated

[rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
Where and how do you put custom logger statements in cucumber? I understood (more or less) how to do this in rspec in the spec_helper file but I do not know where to start with cucumber. I want to add a simple identifying text line in the log file to assist in picking through the output. Somethi

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
aslak hellesoy wrote: > On Mon, Nov 24, 2008 at 8:40 PM, James Byrne <[EMAIL PROTECTED]> > wrote: > >> Where and how do you put custom logger statements in cucumber? I >> understood (more or less) how to do this in rspec in the spec_helper >> file but I do not

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
aslak hellesoy wrote: > On Mon, Nov 24, 2008 at 9:00 PM, James Byrne <[EMAIL PROTECTED]> > wrote: > >> > or other? >> >> Rails 2.2.2 >> > > It depends what you want to log and when. Have you tried to put it in a > Before or After block? >

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
James Byrne wrote: > logger.info("Running Scenario: #{scenario}" > ... > logger.info(" Running Step: #{step}" > ... should be: logger.info("Running Scenario: #{scenario}") and logger.info("Running Step: #{s

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
Joseph Wilk wrote: > > I don't think this is the case. Every Before/After that is in a required > file is run before a scenario. So in theory you could create one Before > (in for example env.rb) which would get called for all scenarios. > I experimented with the following code in env.rb, borr

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread James Byrne
James Byrne wrote: > As I work with Rails TestUnit tests I am reconsidering how to use I discover that in Ruby 1.9 TestUnit is out and minitest is in. I wonder what effect, if any, this will have on future releases of Rails. http://www.ruby-forum.com/topic/171625 -- Posted via http://www.r

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread James Byrne
Tim Walker wrote: > Question: In Cucumber when you're writing code to satisfy steps and > accessing the model objects directly, what support for asserts, responses, > etc. > do people use. (the equivalent of ActionController::TestCase and > ActiveSupport::TestCase), Fixtures, etc. Cucumber depen

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread James Byrne
Aslak Hellesøy wrote: >> >> Cucumber depends upon RSpec. > > No it doesn't > > Aslak Forgive my misapprehension. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rs

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread James Byrne
James Byrne wrote: > Aslak Hellesøy wrote: > >>> >>> Cucumber depends upon RSpec. >> >> No it doesn't >> >> Aslak > > Forgive my misapprehension. So, where does one find a comprehensive list of expectations for cucumber step matche

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread James Byrne
James Byrne wrote: > Aslak Hellesøy wrote: > >>> >>> Cucumber depends upon RSpec. >> >> No it doesn't >> >> Aslak > > Forgive my misapprehension. However, this is what rdoc says: cucumber 0.1.9 [rdoc] [www] - depends on diff-lcs

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread James Byrne
Ben Mabey wrote: > > The previous gem releases of cucumber required the rspec gem but as of a > few commits ago that dependency is only there for developing cucumber. > > -Ben I see. So, if I understand correctly, rspec is the "default" testing framework? But, if one wished to incorporate min

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread James Byrne
James Byrne wrote: > But, if one wished to incorporate minitest say, then one > would extend the cucumber world Where does one put this? A the begining of each step_definitions file? In support/env.rb? -- Posted via http://www.ruby-for

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread James Byrne
Ben Mabey wrote: > Right. Although, I'm unsure if rspec is even the default framework > outside of the rails generators. > -Ben Where can one get a handy quick reference of what syntax is acceptable to cucumber by default? -- Posted via http://www.ruby-forum.com/. _

[rspec-users] Rake features vs. cucumber features

2008-11-26 Thread James Byrne
What exactly is the difference between these two invocations, beside the fact that one is a rake task and one loads and runs the gem directly? I am getting a slew of errors when I run "# cucumber features" whereas "# rake features" passes all the tests. I have manually run "#rake db:test:prepare"

Re: [rspec-users] Rake features vs. cucumber features

2008-11-26 Thread James Byrne
aslak hellesoy wrote: > > When this is implemented it will be easier to diagnose and fix problems > like this. It will give you a hint about other --require options you > might want to add. > > Cheers, > Aslak Thank you. I have add my heartfelt thanks for your work on cucumber. I tried to

Re: [rspec-users] Spec'ing via features

2008-11-26 Thread James Byrne
Tim Walker wrote: > Question: In Cucumber when you're writing code to satisfy steps and > accessing the model objects directly, what support for asserts, > responses, etc. > do people use. (the equivalent of ActionController::TestCase and > ActiveSupport::TestCase), Fixtures, etc. > > Thanks, >

[rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-26 Thread James Byrne
$ rake features ... 56 steps passed $ set AUTOFEATURE=true BASH=/bin/bash ... $ autotest ... script/cucumber features --format progress --format autotest --out /tmp/autotest-cucumber.1527.0 FFFF__F__F__F__F_P_F_P_FP_P_F_P_P_F_P_P_F_P_P_F_P_P_ Pending Scenarios: 1) Identify and record legal

Re: [rspec-users] Autospec running over and over, without changes?

2008-11-26 Thread James Byrne
Scott Burton wrote: > Hi all; > > I have several Rails projects where RSpec is working correctly, and > one in which it is not. Running autospec continuously reloads all > files, running my tests over and over again, without making any > changes. Each time it reloads, it runs a smaller subset of s

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-26 Thread James Byrne
James Byrne wrote: > $ autotest > ... > script/cucumber features --format progress --format autotest --out > /tmp/autotest-cucumber.1527.0 > FFFF__F__F__F__F_P_F_P_FP_P_F_P_P_F_P_P_F_P_P_F_P_P_ > On closer inspection, this looks very much like the problem that I have wit

Re: [rspec-users] Rake features vs. cucumber features

2008-11-26 Thread James Byrne
Andrew Premdas wrote: > Maybe > > cucumber features -r features > YES -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-26 Thread James Byrne
James Byrne wrote: > James Byrne wrote: > >> $ autotest >> ... >> script/cucumber features --format progress --format autotest --out >> /tmp/autotest-cucumber.1527.0 >> FFFF__F__F__F__F_P_F_P_FP_P_F_P_P_F_P_P_F_P_P_F_P_P_ >> > > On closer i

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-27 Thread James Byrne
Ben Mabey wrote: > As the cucumber wiki page says about autotest > (http://github.com/aslakhellesoy/cucumber/wikis/autotest-integration) if > you want to override the arguments used by autotest you need to define > an 'autotest' profile in your cucumber.yml file. I added information > about profi

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-27 Thread James Byrne
James Byrne wrote: > So, depending upon the way cucumber is invoked, either all the tests > pass, all the tests are skipped, or some of the tests pass and some fail > one way and others pass and fail when invoked another way. This seems > problematic for testing and it is far beyo

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-27 Thread James Byrne
James Byrne wrote: > > The error is that there exists no entity with id=1. Ideas? I have resolved all of the test result differences between running cucumber features -r features, rake features, and autotest. These were dependent on whether testunit tests and their associated fixture

Re: [rspec-users] Spec'ing via features

2008-11-27 Thread James Byrne
Tim Walker wrote: > FWIW - I just did it and it seemed OK... > > /features/steps/holiday_steps.rb > ... > Then /^there should be 2 nodes in the control group$/ do > Fixtures.create_fixtures("/../../test/fixtures", "holiday_schedules") > end > ... > > /test/fixtures/holiday_schedules.yml > one:

[rspec-users] cucumber and autotest - running all features?

2008-11-27 Thread James Byrne
Given I have cucumber (0.1.10) And I have ZenTest (3.11.0) And I have features in sub-directories under a directory called features And Each feature sub-directory has a sub-directory called step_definitions And I have .feature files in the features sub-directories And I have .rb files in

Re: [rspec-users] cucumber and autotest - running all features?

2008-11-27 Thread James Byrne
James Byrne wrote: > > I understood that the purpose of autotest was that it ONLY ran a test > for the changed file. However, with this setup, if I touch any file > anywhere in the project then the full suite of feature tests apparently > gets run. for UnitTest autotest onl

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-27 Thread James Byrne
Ben Mabey wrote: > As the cucumber wiki page says about autotest > (http://github.com/aslakhellesoy/cucumber/wikis/autotest-integration) if > you want to override the arguments used by autotest you need to define > an 'autotest' profile in your cucumber.yml file. I added information > about profi

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-27 Thread James Byrne
Ben Mabey wrote: > would be extremely helpful for your insights to be added to the wiki to > help other people who are beginning and will probably have the same > questions you have had. As soon as I have an insight, my wife will faint... I would love to assist in this manner, the difficulty bei

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-28 Thread James Byrne
#{n} Legal Name", >:entity_legal_form => "CORP" >end > end > end > > Note the x inside the blcok. Probably not a good idea to use same > variable inside and outside block > > 2008/11/27 James Byrne <[EMAIL PROTECTED]>: True, true. Althou

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-28 Thread James Byrne
Ben Mabey wrote: > > Sorry if that last remark came across a little snide. What I meant to > say was that the wiki is a community effort and it would be great if you > could improve it with your insight and point of view. > > The wiki instructions probably do suffer from what you described becau

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-28 Thread James Byrne
aslak hellesoy wrote: >> "Worthy of note is that, inside the step files, one must enclose the >> arguments to the *Given/When/Then/And* methods with a string delimiter": > > This is only a convention to make it easier to know what's a variable > when reading/editing a feature. It is absolutely no

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-12-01 Thread James Byrne
Andrew Premdas wrote: > No it isn't you can have > > When /determine the party (.*)/ do > > And call that in in other nested step using a string literal > > When >When "deterimine the party foo" > end > > In fact I never enclose the arguments with a string delimiter as I > think it makes th

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-12-01 Thread James Byrne
Ben Mabey wrote: > James Byrne wrote: >>> as we had hoped. Since you are coming from a different perspective it >> > This looks great, thanks for adding it! The only thing I would change, > that Aslak already mentioned, is that the word Tests should be changed >

[rspec-users] cucumber/rspec pending call

2008-12-02 Thread James Byrne
I have tried to do this in a step definition: When /set the "(.*)" to "(.*)"/ do |a,v| pending end However, no matter how I invoke cucumber, I get this error: And I set the "type" to "main"# features/locations/step_definitions/location_steps.rb:33 TODO (Spec::

Re: [rspec-users] cucumber/rspec pending call

2008-12-02 Thread James Byrne
Joseph Wilk wrote: > 'pending' is not supported yet. > > There is some work waiting to be done on pending steps: > http://rspec.lighthouseapp.com/projects/16211/tickets/52-unmatched-steps-should-less-tolerable-than-pending-steps > > But I think it could do with a new ticket. Would you mind creat

Re: [rspec-users] cucumber/rspec pending call

2008-12-02 Thread James Byrne
Joseph Wilk wrote: > When /set the "(.*)" to "(.*)"/ do |a,v| > raise Cucumber::Pending.new("I need to implement this asap") > end That works nicely. The string argument does not show up anywhere that I could find when this is invoked from autotest but the step definition itself is treated a

[rspec-users] stepping across features

2008-12-02 Thread James Byrne
I am perplexed by a situation that I am creating for myself, probably out of ignorance. I have two models connected through a join table which itself contains information related to the join. I am testing the creation of this join. I already have step definitions written for one of the outside m

Re: [rspec-users] stepping across features

2008-12-03 Thread James Byrne
Andrew Premdas wrote: > Perhaps the creation of the join is not something that should be > tested by a feature. This sounds to me like an implementation detail > that would be better tested by some sort of unit test. So if your > features want to have things in them mentioning joins, databases and

[rspec-users] Cucumber and Rcov

2008-12-03 Thread James Byrne
I am now trying to get rcov to work for me, without much success. I stole the rake task code from the cucumber site: desc "Run all features" task :features => "features:all" task :features => 'db:test:prepare' require 'cucumber/rake/task' #I have to add this -mischa namespace :features do Cucu

Re: [rspec-users] Cucumber and Rcov

2008-12-03 Thread James Byrne
Mischa Fierer wrote: > James, > > Maybe you are asking something else...but after you type rake > feature:rcov > there should be a folder in rails root called "features_rcov," which may > solve your problem. > > rake features:rcov > open features

Re: [rspec-users] stepping across features

2008-12-04 Thread James Byrne
Andrew Premdas wrote: > It seems to me that there are all sorts of implementation details in > this story that could make your tests quite brittle. And the feature is > definitiley a programmer writing a test, rather than a customer Guilty as charged. > Putting on my customer hat > > Scenario:

Re: [rspec-users] stepping across features

2008-12-04 Thread James Byrne
I need a bit of instruction. I have spent the day reading online bloggs, tutorials, and howtos relating to BDD, RSpec and testing. I have also spent several hours going through the cucumber spec/test suites in an attempt to absorb some sense of how best to proceed. I am somewhat nonplussed.

Re: [rspec-users] stepping across features

2008-12-05 Thread James Byrne
Andrew Premdas wrote: > James, ... > > So back to your original question where does all the detail go? Well > acceptance tests start from the general and go to the specific, so > detail comes further down some sort of heirarchy. Thing is you > haven't got a hierarchy yet

Re: [rspec-users] stepping across features

2008-12-05 Thread James Byrne
Andrew Premdas wrote: > Pretty hard for me to comment with so much stuff and so little context. > However :) My messages are quite long enough as it is I am afraid. > about a work order to produce invoices. You have to do some design and > thinking to produce good features. Challenge assumptions

Re: [rspec-users] 'And' step definition

2008-12-05 Thread James Byrne
Mark Wilden wrote: > Can you have an And step in a feature? With this, I get a NoMethodError > for > 'And': > > Given /a company named (.+)/ do |name| > @company = Company.create!(:name => name) > end > > And /a user named (.+)/ do |name| > @user = create_user name > end > > I'm probably mi

  1   2   3   4   5   >