Re: [rspec-users] class variables different between spec and runtime?

2009-12-28 Thread Rick DeNatale
On Mon, Dec 28, 2009 at 12:18 AM, Andrew Premdas wrote: > 2009/12/22 Rick DeNatale > Please explain why - thanks. Because, classes and class variables aren't guaranteed to be persistent. In development mode, classes can get reloaded, which wipes out class (and class instance) variables. In mo

Re: [rspec-users] Submitting a Custom Matcher: gem or other method?

2009-12-28 Thread David Chelimsky
On Sun, Dec 27, 2009 at 2:03 PM, Ed Howland wrote: > Hi, I have a custom matcher that I call XMLDiff that takes an actual > XML string and an expected one and uses RSpec's normal line differ to > show the difference at the node level. It uses a method called > be_functionaly_eql, because two XML

[rspec-users] Listing all specs in a given file

2009-12-28 Thread Sean Grove
I'm trying to write a simple spec dispatcher, the client-side of which essentially does the following: options = Spec::Runner::OptionParser.parse( "#{file}", $stderr, std_out ) options.line_number = line Spec::Runner::CommandLine.run(options) Given a spec file and a line number, it'll run t

Re: [rspec-users] Listing all specs in a given file

2009-12-28 Thread David Chelimsky
On Mon, Dec 28, 2009 at 10:48 AM, Sean Grove wrote: > I'm trying to write a simple spec dispatcher, the client-side of which > essentially does the following: > > options = Spec::Runner::OptionParser.parse( "#{file}", $stderr, std_out ) > options.line_number = line > Spec::Runner::CommandLine.run

Re: [rspec-users] Listing all specs in a given file

2009-12-28 Thread Sean Grove
I'm writing a very simple spec dispatcher, but I want to do it on the level of examples. I'd like to be able to send individual examples to my clients, have it run and receive the result back. Currently I can send a file name and have the entire file run (thus distributing the rspec tasks a

[rspec-users] be_true and be_false

2009-12-28 Thread David Chelimsky
Hi all, The be_true and be_false matchers pass if the actual object is the singleton instance of true or false respectively. e.g. true.should be_true # passes 1.should be_true # fails "true".should be_true #fails false.should be_false # passes nil.should be_false # fails http://rspec.lighthouse

Re: [rspec-users] be_true and be_false

2009-12-28 Thread David Chelimsky
On Mon, Dec 28, 2009 at 1:04 PM, David Chelimsky wrote: > Hi all, > > The be_true and be_false matchers pass if the actual object is the > singleton instance of true or false respectively. e.g. > > true.should be_true # passes > 1.should be_true # fails > Actually, "1.should be_true" passes, but

[rspec-users] eq(expected)

2009-12-28 Thread David Chelimsky
Hey all, I'm thinking of adding an eq(expected) matcher. Please comment in https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/932 if you're interested. Cheers, David ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/ma

Re: [rspec-users] Submitting a Custom Matcher: gem or other method?

2009-12-28 Thread Ed Howland
On Mon, Dec 28, 2009 at 11:27 AM, David Chelimsky wrote: > On Sun, Dec 27, 2009 at 2:03 PM, Ed Howland wrote: >> >> Hi, I have a custom matcher that I call XMLDiff that takes an actual >> XML string and an expected one and uses RSpec's normal line differ to >> show the difference at the node leve

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] no should raise_exception

2009-12-28 Thread David Chelimsky
On Mon, Dec 28, 2009 at 2:08 PM, rogerdpack wrote: > > 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 compatibi

[rspec-users] rake spec seems to not clean the database after failing specs

2009-12-28 Thread Doug
running all specs with 'rake spec' working on a spec that gets run last. when run individually, it is green. but in 'rake spec' it fails because the database is dirty I'm guessing this is caused by early specs that fail as well is this normal? if that's the problem, what's the best way to f

Re: [rspec-users] rake spec seems to not clean the database after failing specs

2009-12-28 Thread Rick DeNatale
On Mon, Dec 28, 2009 at 6:56 PM, Doug wrote: > running all specs with 'rake spec' > > working on a spec that gets run last. > when run individually, it is green. > but in 'rake spec' it fails because the database is dirty > > I'm guessing this is caused by early specs that fail as well > > is

[rspec-users] Help with w3c html validation on every rspec requests

2009-12-28 Thread mix
Hi, I'm studying rspec in these days (the rspec book is really great... i'll wait for the missing chapters and a next "rspec advanced book" :) ). But for now i'm trying to solve a problem. I'm a kind of w3c validation fanatic, i mean, i like to give my clients well written code (following "The Stan

Re: [rspec-users] no should raise_exception

2009-12-28 Thread Rodrigo Rosenfeld Rosas
David Chelimsky escreveu: On Mon, Dec 28, 2009 at 2:08 PM, rogerdpack > wrote: > 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,