Re: [rspec-users] Strange validation errors

2010-03-18 Thread jollyroger
Hey David, I experienced similar problems as depicted above in other projects now as well. E.g. a wrong-used stub in an it-block overwrote stubs established in helper functions for the whole spec-file etc. This was a mocha-related problem, I know that for sure cause when I swapped out mocha for rs

[rspec-users] Rspec doubles & rails metal

2010-03-18 Thread Nash
Hi, I've created a cucumber test to test a metal I've created that connects to a third party. I'm using rspec mocks to create a stub for the 3 party. It seems that stubbing/mocking isn't extending all the way to the metal. It calls the read object and not the stub. Any idea of how I can ma

[rspec-users] rspec with out Active Record

2010-03-18 Thread harinionrails
I want to use rspec with my application where we don't have database. I want to know how to use fixtures with out ORM layer. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] rspec with out Active Record

2010-03-18 Thread David Chelimsky
On Mar 17, 2010, at 6:25 PM, harinionrails wrote: > I want to use rspec with my application where we don't have database. The answer to this is in spec/spec_helper.rb (lines 16 - 21), which is generated when you run "script/generate rspec" in the root of your rails app: http://github.com/dcheli

Re: [rspec-users] rspec with out Active Record

2010-03-18 Thread Freak
On Thursday 18 March 2010 00.25:51 harinionrails wrote: > I want to use rspec with my application where we don't have database. > I want to know how to use fixtures with out ORM layer. Probably those fixtures are now called 'stubs'. ___ rspec-users mailin

Re: [rspec-users] Rspec doubles & rails metal

2010-03-18 Thread David Chelimsky
On Mar 17, 2010, at 6:05 PM, Nash wrote: > Hi, > > I've created a cucumber test to test a metal I've created that > connects to a third party. > > I'm using rspec mocks to create a stub for the 3 party. It seems > that stubbing/mocking isn't extending all the way to the metal. It > calls the r

[rspec-users] shared_example can't have the same name even if defined it different specs

2010-03-18 Thread drewB
I am writing some specs related to permissions for different kinds of users. Every user has some common examples to test in many different specs. For example, all users can view, and edit their profile. Also, all users can view their own "history." So I have two spec files, say profile_controlle

Re: [rspec-users] shared_example can't have the same name even if defined it different specs

2010-03-18 Thread David Chelimsky
On Mar 18, 2010, at 4:18 PM, drewB wrote: > I am writing some specs related to permissions for different kinds of > users. Every user has some common examples to test in many different > specs. For example, all users can view, and edit their profile. > Also, all users can view their own "history

Re: [rspec-users] how to mock a Net::Http object?

2010-03-18 Thread Bartosz Blimke
You can also use WebMock http://github.com/bblimke/webmock -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] how does one define dependencies on a specTask?

2010-03-18 Thread jw
I get that you create dependencies on a normal rake task like this: task :codeGen do # do the code generation end task :compile => :codeGen do # do the compilation end but what is the syntax for a specTask? Spec::Rake::SpecTask.new('task1a') do |t| # t.spec_files = ... end You can cre

Re: [rspec-users] how does one define dependencies on a specTask?

2010-03-18 Thread David Chelimsky
On Mar 18, 2010, at 12:12 PM, jw wrote: > I get that you create dependencies on a normal rake task like this: > > task :codeGen do > # do the code generation > end > > task :compile => :codeGen do > # do the compilation > end > > > but what is the syntax for a specTask? > > Spec::Rake::Spec