Re: [rspec-users] how to play with rSpec using irb

2008-10-15 Thread Caius Durling
On 15 Oct 2008, at 05:10, Alr Alr wrote: Hi, Is there any way to experiment with rSpec in irb or script/console session? Tried this: require 'spec' = true [1,2,3].should have(3).items = NoMethodError: undefined method `have' for main:Object from (irb):4 from

Re: [rspec-users] how to play with rSpec using irb

2008-10-15 Thread Alr Alr
Julius:~ caius$ irb require spec = true include Spec::Matchers = Object %w(1 2 3).should have(3).items = true C --- Caius Durling [EMAIL PROTECTED] +44 (0) 7960 268 100 http://caius.name/ thx, its working. -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] Rails config.gem and rspec, rspec-rails

2008-10-15 Thread Juanma Cervera
Zach Dennis wrote: In #rspec the instructions for installing rspec and rspec-rails on a Rails project. Specifically talking about the following line from http://github.com/dchelimsky/rspec-rails/wikis/home config.gem rspec-rails, :lib = spec I think this should be updated to not

[rspec-users] extend Cucumber's arguments

2008-10-15 Thread aidy lewis
Hi, We would like to pass in some additional command line arguments into Cucumber (for example to specify which browser to run the tests with). Is there any way to extend Cucumber's arguments, or could you suggest an alternative way of going about this? Aid

Re: [rspec-users] extend Cucumber's arguments

2008-10-15 Thread aslak hellesoy
On Wed, Oct 15, 2008 at 12:26 PM, aidy lewis [EMAIL PROTECTED] wrote: Hi, We would like to pass in some additional command line arguments into Cucumber (for example to specify which browser to run the tests with). Is there any way to extend Cucumber's arguments, or could you suggest an

Re: [rspec-users] Just a quick question on David's new-controller-examples

2008-10-15 Thread Mark Wilden
I have a different question about the article (pity comments are closed). def mock_account(stubs={}) stubs = { :save = true, :update_attributes = true, :destroy = true, :to_xml = '' }.merge(stubs) @mock_account ||= mock_model(Account, stubs) end With this

Re: [rspec-users] Just a quick question on David's new-controller-examples

2008-10-15 Thread Shane Mingins
Hi Mark Yeah I was looking at that later on too. And yes if you use in a 'before' it does. Only setting in an 'it' block is ok. I was using this as a quick test as we are on an older version of rspec and I was checking if it may have changed but this fails on 1.1.8 require

Re: [rspec-users] How to spec accessing a constant

2008-10-15 Thread Craig Demyanovich
Probably, I would just check the outcome of the method instead of checking interaction with a constant. Craig ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How to spec accessing a constant

2008-10-15 Thread Zach Dennis
On Wed, Oct 15, 2008 at 4:39 PM, Craig Demyanovich [EMAIL PROTECTED] wrote: Probably, I would just check the outcome of the method instead of checking interaction with a constant. What he said, -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com

Re: [rspec-users] autotest with a non-rspec project

2008-10-15 Thread Jon Dahl
I'm getting the same error - I'm using Test::Unit with Shoulda for this particular project, and can't autotest because it is trying to load autotest/rails_rspec. David Chelimsky wrote: The only reason that I know of that this would be happening would be that there are both a spec directory in

Re: [rspec-users] How to spec accessing a constant

2008-10-15 Thread Nick Hoffman
On 2008-10-15, at 16:39, Craig Demyanovich wrote: Probably, I would just check the outcome of the method instead of checking interaction with a constant. Craig So you guys wouldn't worry about the spec for class A being coupled to this constant in class B? -Nick

Re: [rspec-users] How to spec accessing a constant

2008-10-15 Thread Craig Demyanovich
On Wed, Oct 15, 2008 at 8:47 PM, Nick Hoffman [EMAIL PROTECTED] wrote: On 2008-10-15, at 16:39, Craig Demyanovich wrote: Probably, I would just check the outcome of the method instead of checking interaction with a constant. Craig So you guys wouldn't worry about the spec for class A

Re: [rspec-users] autotest with a non-rspec project

2008-10-15 Thread David Chelimsky
On Wed, Oct 15, 2008 at 8:24 PM, Jon Dahl [EMAIL PROTECTED] wrote: I'm getting the same error - I'm using Test::Unit with Shoulda for this particular project, and can't autotest because it is trying to load autotest/rails_rspec. David Chelimsky wrote: The only reason that I know of that this

Re: [rspec-users] How to spec accessing a constant

2008-10-15 Thread Scott Taylor
On Oct 15, 2008, at 4:31 PM, Nick Hoffman wrote: Hi guys. One of my methods uses a constant in another method, like this: class A def something foo: #{B::BAR} end end When writing the spec for A#something , how would you mock or stub #{B::BAR}, and how would you set an