Re: [rspec-users] Testing c code with rspec?

2007-08-26 Thread Steven R. Baker
Ben Mabey wrote: > Hey all, > Has any one ever tested or try to test c code with rspec? I am using > system calls to my compiled c program and testing against the standard > output but I would like to get a lot more granular than this. I have > I've specified Ruby C extensions using RSpec, b

Re: [rspec-users] Testing c code with rspec?

2007-08-26 Thread Ben Mabey
Ben Mabey wrote: > Hey all, > Has any one ever tested or try to test c code with rspec? I am using > system calls to my compiled c program and testing against the standard > output but I would like to get a lot more granular than this. I have > experimented with using RubyInline to test indivi

[rspec-users] Testing c code with rspec?

2007-08-26 Thread Ben Mabey
Hey all, Has any one ever tested or try to test c code with rspec? I am using system calls to my compiled c program and testing against the standard output but I would like to get a lot more granular than this. I have experimented with using RubyInline to test individual functions and that wo

[rspec-users] Foreign key constraints, fixtures, and rake task

2007-08-26 Thread Jay Levitt
I've got a spec that loads a fixture in the "before" block. This works fine running scripts/spec, but when I run rake spec instead, I get: ActiveRecord::StatementInvalid in 'User in fixture :quentin with an IM service but no IM name should be invalid' Mysql::Error: Cannot delete or update a par

Re: [rspec-users] howto regressions on environment.rb in Rails projects

2007-08-26 Thread Scott Taylor
On Aug 26, 2007, at 7:22 PM, Michael Klishin wrote: > Seems that the assertion itself is just obvious > > lambda { ... }.should_not raise_error ... > > But given the fact environment.rb is loaded well before examples are > run, is it worth the effort it may take to spec out Rails bootstrap > pr

Re: [rspec-users] howto regressions on environment.rb in Rails projects

2007-08-26 Thread Michael Klishin
Seems that the assertion itself is just obvious lambda { ... }.should_not raise_error ... But given the fact environment.rb is loaded well before examples are run, is it worth the effort it may take to spec out Rails bootstrap process? Sorry if I do not get your question. Scott Taylor wrote: >

[rspec-users] howto regressions on environment.rb in Rails projects

2007-08-26 Thread Scott Taylor
How would one write a spec on environment.rb in a rails app? I was requiring a gem in environment.rb, but received a "MissingSourceError". Generally, ruby raises a LoadError when it can't find a gem, but rails overrides this to raise a MissingSourceError (since rails is expecting a require

Re: [rspec-users] ror app with advanced rspec?

2007-08-26 Thread rupert
plus for a rails app that uses rspec, there's the caboose sample app: http://blog.caboo.se/pages/sample-rails-application On 26 Aug 2007, at 11:24, Michael Klishin wrote: > RSpec itself is a nice example of pretty large open source project > that > uses RSpec for testing ;) > > It's a general

Re: [rspec-users] ror app with advanced rspec?

2007-08-26 Thread Michael Klishin
RSpec itself is a nice example of pretty large open source project that uses RSpec for testing ;) It's a general problem in TDD/BDD worlds: what to test and how to keep it maintainable. I'd recommend reading mockobjects.com. Priit Tamboom wrote: > Hi! > > Can anybody link to some ror based pro

[rspec-users] ror app with advanced rspec?

2007-08-26 Thread Priit Tamboom
Hi! Can anybody link to some ror based project what is using rspec, so nuby as me can learn from it. So it should have updated and practising advanced rspec. After reading last threat about "testing behaviour or testing code?", I just realised that I would definitely learn something from app like