[rspec-users] autorun?

2011-05-24 Thread rogerdpack
Hello all. I believe I was under the impression that with rspec 2, one didn't need to require 'autorun' to have specs autorun. Can anybody tell me if this is the case or not? Thanks! -roger- ___ rspec-users mailing list rspec-users@rubyforge.org http://ru

[rspec-users] dynamic tests possible?

2010-08-18 Thread rogerdpack
Sorry if this is a newbie question, but here goes. I was wondering if the following is somehow possible: for file in Dir['*.bmp'] it "should be able to parse #{file}" do p file # test this file end end Currently rspec seems to evaluate the blocks after the fact, leading

[rspec-users] migration question

2010-08-02 Thread rogerdpack
Got this: no such file to load -- spec/rake/spectask anybody know off hand what the equivalent is for rspec2? -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] methods not available...

2010-07-20 Thread rogerdpack
> >  it "should pass again" do > >   context "a::b" do > > You can't wrap contexts inside examples. Cool thanks for the reply. The confusing part is that it allowed me to have that context within an example. Maybe a more explicit failure for newbies when they do this would be kind. -r __

Re: [rspec-users] Event machine support

2010-07-20 Thread rogerdpack
> My understanding is eventmachined is normally run within Thin, and it > is Thin who initiates the event loop. > > So how do you test the eventmachined rails app? Do we have to modify > the rspec script to initiate the event loop? You could also use before(:all) do EM.start_in_other_thread end

[rspec-users] methods not available...

2010-07-20 Thread rogerdpack
Hi all. Noticed that with rspec 1.x methods at "higher levels" aren't available in lower, ex: context "a" do def go end it "should pass" do go end it "should pass again" do context "a::b" do go end end end This surprised me a bit, making re-use of outer methods unavail

[rspec-users] rspec2 help output has brackets?

2010-07-19 Thread rogerdpack
Hi all. Saw this: Usage: rspec [options] [files or directories] -b, --backtrace Enable full backtrace -c, --[no-]color, --[no-]colour Enable color in the output -d, --debug Enable debugging -e, --example PATTERNRun examples whose

[rspec-users] pending blocks

2010-07-14 Thread rogerdpack
Would it be possible to have pending be accessible everywhere? Curgem rently with describe '' do pending 'abc' do end end yields: C:\dev\ruby\universal-scene-skipper\spec>spec small.spec C:/dev/ruby/universal-scene-skipper/spec/small.spec:3: undefined method `pending' for Spec::Example::Examp

Re: [rspec-users] cleaner failure messages?

2010-06-22 Thread rogerdpack
> >    Failure/Error: Unable to find matching line from backtrace > > Perhaps it isn't quite windows friendly? > > That happens now and then when the error is in code generated with > eval(string) with no file and ref numbers. Has nothing to do with Windows as > far as I know, and is the same pr

Re: [rspec-users] cleaner failure messages?

2010-06-22 Thread rogerdpack
> > The skinny of this request is that I'd find it more useful to actually > > have the code displayed that failed on line 14, in this case, the word > > "fail" ... > Already done in rspec-2. Likely won't backport it to rspec-1 for some time > (if ever). Nice. Looks like rspec-2 will fit the bill

[rspec-users] cleaner failure messages?

2010-06-19 Thread rogerdpack
Hi all. Sorry if this is an old request... Currently when a failure is reported it looks like this: C:\dev\ruby\faster_rubygems\spec>spec spec.faster_rubygems_cacheing.rb F 1) RuntimeError in 'FasterRubyGems cacheing Gem.bin_path should cache and reload Gem.bin_path where possible' assertion fai

Re: [rspec-users] cleanup wiki

2010-06-17 Thread rogerdpack
> > I think a TOC would be far easier to maintain, no? I think so. I'll create one sometime. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] cleanup wiki

2010-06-11 Thread rogerdpack
The wiki (especially the index on its right hand) http://wiki.github.com/dchelimsky/rspec/ currently (to me) feels a bit hard to navigate. Given that my one request to github to allow for orderable right hand index was denied, I was wondering if some work wants to be done on it to make it easier

Re: [rspec-users] raise_error suggestion

2010-04-15 Thread rogerdpack
> Be explicit about the error you expect to get: > > lambda { ... }.should raise_error(SomeErrorClass, /match the message/) > > Read the documentation > athttp://rspec.rubyforge.org/rspec/1.3.0/classes/Spec/Matchers.html#M00... Perhaps it should be changed so that if you don't pass a class it out

[rspec-users] raise_error suggestion

2010-04-14 Thread rogerdpack
I remember reading a post where somebody mentioned something like "sometimes after a refactoring, a test block like lambda { ... }.should raise_error catches a NoMethodError in error, thus is actually failing, but the user isn't notified of the same." A suggestion in this regard: change it

Re: [rspec-users] rspec "output which test it is running before running it"

2010-02-25 Thread rogerdpack
On Feb 25, 8:44 am, Matt Wynne wrote: > Do you mean --format specdoc ? Interesting. It appears that with both specdoc and --format nested, it outputs the test name *after* running it. I would have expected the opposite. Is this expected? Thanks. -r __

Re: [rspec-users] rspec "output which test it is running before running it"

2010-02-25 Thread rogerdpack
> spec spec --format nested Cool thanks! -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] rspec "output which test it is running before running it"

2010-02-25 Thread rogerdpack
I'm trying to find a spec parameter that will do something like the following $ spec file.spec Spec: running "it should pass spec x" . Spec: running "it should pass spec y" . That type of thing. The use case is that "one" of my tests is outputting some weird stuff and I want to narrow down on

Re: [rspec-users] spec_server for test-unit

2010-02-03 Thread rogerdpack
> spec-server was deprecated and removed a few versions back in favor of > spork, which works with rspec and test/unit AFAIK. Right, I was just wondering if there was something that pre-dated spork, but for test-unit shtuffs...spork does support test-unit but only barely--trying to see if there's

[rspec-users] spec_server for test-unit

2010-02-03 Thread rogerdpack
A bit off topic, but does anybody know if there's an equivalent to "spec_server" for test-unit style tests? Thanks. -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] somewhat confused by the help instructions...

2010-02-02 Thread rogerdpack
> > Done: > > http://github.com/rspec/rspec-core/blob/master/features/command_line/... Thanks for doing that. -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] somewhat confused by the help instructions...

2010-01-28 Thread rogerdpack
As a note of feedback, when I do a spec --help, I saw this line... -e, --example [NAME|FILE_NAME] Execute example(s) with matching name(s). If the argument is the path to an existing file (typically generated by a previous

Re: [rspec-users] unable to describe...expected?

2010-01-26 Thread rogerdpack
> is allowed, however this code > > module Redcar >  describe Project do >     ... > > is not. Oops--appears the problem was that I was running it as ruby instead of spec (and/or including autorun). Sorry for the noise. -r ___ rspec-users mailing list r

[rspec-users] unable to describe...expected?

2010-01-26 Thread rogerdpack
Question. I noticed that this code: class Redcar::Project describe FileMirror do is allowed, however this code module Redcar describe Project do ... is not. Is this expected? -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rub

[rspec-users] double warning in doze

2010-01-22 Thread rogerdpack
When I run autospec, I typically see this double warning--might be nice to clean it up a bit. You must 'gem install win32console' to use colour on Windows You must 'gem install win32console' to use colour on Windows ___ rspec-users mailing list rspec-use

Re: [rspec-users] running specs on JRuby w/nailgun

2010-01-21 Thread rogerdpack
> Has anyone solved this problem to get lightning fast specs on JRuby just > like we can with MRI and Spork? I'm working on a single threaded spork http://github.com/rdp/spork it might work with jruby it sure does speed things up mightily here in windows land -r ___

[rspec-users] specify line for autorun?

2010-01-16 Thread rogerdpack
Am I correct in assuming this should work (bug)? # spec.fast_require.rb contains the line require 'spec/autorun' E:\dev\ruby\fast_ruby_require\spec>ruby spec.fast_require.rb -l25 Only one file can be specified when providing a line number: [] -rp ___ r

Re: [rspec-users] test-unit oddities

2010-01-13 Thread rogerdpack
> so the question is...whose fault is this? gems? rails? I think it's rails' fault for not being careful when running $LOAD_PATH.uniq! ... -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] test-unit oddities

2010-01-13 Thread rogerdpack
I think I've tracked down why rspec dislikes test-unit gems > 1.3.5 this code: gem 'rails', '= 2.3.5' puts $LOAD_PATH.find{|l| l.instance_variables.include? (:@gem_prelude_index)} puts $LOAD_PATH.uniq.find{|l| l.instance_variables.include? (:@gem_prelude_index)} [if you take off the '= 2.3.5' i

Re: [rspec-users] nested steps

2010-01-13 Thread rogerdpack
> You do realise you can already nest contexts don't you? That makes   > much more sense to me than what you've suggested. Ahh that is what I lacked. That should suffice. Thanks! -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge

[rspec-users] default to just call the method?

2010-01-12 Thread rogerdpack
Any interest in the following idea? a.should include?("1:4") # if there's no matcher called include? then just call include? or something along those lines? -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo

Re: [rspec-users] [ANN] rspec 1.3.0 Released

2010-01-12 Thread rogerdpack
> rspec version 1.3.0 has been released! Thanks for the release. -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] nested steps

2010-01-12 Thread rogerdpack
Question. Currently rspec appears to allow for a two-step test system, like context "abc" it 'should do y' do end end It might be convenient to have an arbitrary number of nests, like context "abc" it 'should do y' do it 'should also be able to do x' end end end Thoughts? -r _

[rspec-users] straight strings?

2010-01-09 Thread rogerdpack
I saw some tests like this the other day: it "the nodes are the contents of the directory" do ... end Made me wonder if the idea had been proposed to skip the it, like. "the nodes are the contents of the directory".do { ... } or what not. Thoughts? -r

Re: [rspec-users] more verbosity for be_an?

2010-01-09 Thread rogerdpack
> What about something like: > >   expected # => Fixnum to be a kind of Fixnum Still in favor of something like this... :) -rp ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] more verbosity for be_an?

2010-01-03 Thread rogerdpack
> > The very first test I thought up was "this method should return an > > integer" so kind of a basic test for a not yet existent method. > > Isn't this a bit anti-ruby though. Surely the things we should be testing is > that the object exists, responds to certain messages and gives certain > valu

Re: [rspec-users] more verbosity for be_an?

2009-12-30 Thread rogerdpack
> What about something like: > >   expected # => Fixnum to be a kind of Fixnum > > That is more aligned with other failure messages. WDYT? I quite like it. In this instance it was 3.class.should be_a Fixnum # fails I suppose it would be something like expected # => Class to be a kind of Fixnum

[rspec-users] more verbosity for be_an?

2009-12-30 Thread rogerdpack
before I hack up a patch for it. Would a patch to change "expected Fixnum to be a kind of Fixnum" to "expected Fixnum to be a kind of Fixnum (is a Class)" or possibly "expected Fixnum to be a kind of Fixnum (is a Class, Module, Object, Kernel, BasicObject)" have any chance of being accepted

Re: [rspec-users] no should raise_exception

2009-12-29 Thread rogerdpack
> So we're going to leave it as raise_error for now. If you'd like to push on > this (which you're welcome to), please add a ticket to lighthouse so it's > easy to find the discussions around it. If we can get general consensus that > this would be a good move in spite of the negatives I just outli

Re: [rspec-users] no should raise_exception

2009-12-28 Thread rogerdpack
> What I really want to say is "should raise(Blah)" but Ruby already defines > raise as a keyword :) > > I'd be open to aliasing raise_error with raise_exception, renaming it to > raise_exception and aliasing raise_error for compatibility, but I think this > might just add confusion rather than cla

Re: [rspec-users] concept of given

2009-12-22 Thread rogerdpack
> context "given a certain set of paths" do Ahh so it's called context. Cool (though I'll admit that naming it "given" can make it sound more like an English sentence, so an alias would be a suggestion). Much thanks. -r ___ rspec-users mailing list rs

[rspec-users] concept of given

2009-12-22 Thread rogerdpack
Forgive me if the question is a common one... does rspec have any concept like given "a certain set of paths" do it "should be able to recreate them" do; end it "..."; end end ? Thanks. -r ___ rspec-users mailing list rspec-users@rubyforge.org htt

Re: [rspec-users] no should raise_exception

2009-12-22 Thread rogerdpack
> raise_error already catches any type of exception, error or not: > >   class BlahException < Exception; end >   class BlahError < StandardError; end > >   lambda { raise BlahException }.should raise_error(BlahException) >   lambda { raise BlahError }.should raise_error(BlahError) >   lambda { rai

[rspec-users] no should raise_exception

2009-12-19 Thread rogerdpack
I know there's a raise_error however...exceptions are not always errors, so I had expected a raise_exception matcher...would this be a reasonable addition (I'd be happy to do it). Thanks. -r ___ rspec-users mailing list rspec-users@rubyforge.org http://ru

[rspec-users] cleanup pendings?

2009-12-15 Thread rogerdpack
Currently with pending... it "should do something"; or it "should do something" do pending "some work" end I get this type of output: Pending: After should immediately return if the other process doesn't exist (Not Yet Implemented) C:/dev/ruby/wait_for/test/spec.after.rb:5:in `block in '

Re: [rspec-users] surprising...

2009-12-03 Thread rogerdpack
> You're about 4 years late to the party. We were playing around with a > variety of options back in 2005 and went with the current syntax because it > gave us the most flexibility and the highest level of decoupling, making it > easier for others to create their own matcher libraries. While it wou

Re: [rspec-users] surprising...

2009-11-30 Thread rogerdpack
> And when it did there was a lot more in the way of methods added to > Kernel, and that's one of the reasons I avoided RSpec back then, way > too much Heisenberg effect. > > With the current design, there's very little added to all Ruby > objects, just Kernel#should and Kernel#should_not and that

[rspec-users] surprising...

2009-11-28 Thread rogerdpack
It is somewhat surprising to me, as a newbie, to have to assert a.should be_a(Hash) That extra space in there feels awkward. Suggestion: allow for constructs like a.should.be_a(Hash) Thoughts? Much thanks. -r ___ rspec-users mailing list rspec-users@r

Re: [rspec-users] ruby file.spec?

2009-11-13 Thread rogerdpack
> What happens when you try it? > > (You *do* have the power to experiment, you know.  You don't need permission.) C:\dev\ruby\old\arguments\spec>ruby arguments_spec.rb arguments_spec.rb:5: undefined method `describe' for main:Object (NoMethodError) or adding a require 'spec' in there C:\dev\

Re: [rspec-users] better documentation?

2009-11-12 Thread rogerdpack
> I really like what Aslak and the Cucumber community have done by   > making cukes.info more high level and building up more extensive   > documentation on the github wiki, so I'd rather put energy into   > beefing up the github wiki than improve rspec.info. What do you think? Using a wiki sound

Re: [rspec-users] odd error

2009-11-12 Thread rogerdpack
> > expected: "`four, five` are not recognized argument keywords", > >     got: "`five, four` are not recognized argument keywords" (using > > ==) > > ./spec\arguments_spec.rb:140: > > Please be sure to post the relevant code when you are asking for help on > this list. I'll take a guess at what is

[rspec-users] ruby file.spec?

2009-11-12 Thread rogerdpack
perhaps this has been discussed before and you can point me to the right thread, but is it possible to run specs from the command line using just ruby? ruby arguments_spec.rb and it "just run" (like test/unit seems to)? I can't think of a great reason why this would be useful, other than not havi

[rspec-users] better documentation?

2009-11-04 Thread rogerdpack
I'm interested in helping the documentation for rspec, ex: http://rspec.info/ described similarly to how this person feels (that there's not too much "getting started" docu). http://creativedeletion.com/2007/05/27/the-new-rspec-format-testingspecing-in-ruby/ Is there anywhere to fork or what no

[rspec-users] question

2009-11-04 Thread rogerdpack
Perhaps it would be useful to do some parsing of the messages... it "should raise an Exception if record is invalid" do end # expects that block to raise Thoughts? -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mail

[rspec-users] odd error

2009-11-04 Thread rogerdpack
with 1.8.6 + rspec 1.2.9 (sorry couldn't try trunk, see previous post) I get: C:\dev\ruby\old\arguments>spec spec\arguments_spec.rb ..F 0.00 0.00 0.00 ( 0.00) .F 0.00 0.00 0.00 ( 0.00) 0.015000 0.00 0.015000 ( 0.015625) .

[rspec-users] unable to build gem

2009-11-04 Thread rogerdpack
Is the following expected? C:\dev\ruby\downloads\rspec>rake gem (in C:/dev/ruby/downloads/rspec) in rdoc 2.4.3 rake aborted! Don't know how to build task 'lib/spec/matchers/extensions/ instance_exec.rb' (See full trace by running task with --trace) Thanks. -r ___

[rspec-users] error message feedback

2009-07-29 Thread rogerdpack
Question. Currently with this test: instance.splatted3().should raise_error(ArgumentError) if it's broken, and returns [] instead of raising appropriately, currently the error reported is: expected ArgumentError, got # shouldn't this have been reported as expected ArgumentError, got [] ? Mu