Re: [rspec-users] Behavior of object.foo(x) when you've stubbed it using object.stub(:foo).with(y)

2010-09-19 Thread Justin Ko
On Sep 19, 8:08 pm, Myron Marston wrote: > The current behavior of rspec-mocks causes a NoMethodError when you > call object.foo(x) after setting up a stub using > object.stub(:foo).with(y).  Here's an example for when this has caused > me a problem: > > - In a before(:each) block, I've setup a

[rspec-users] Behavior of object.foo(x) when you've stubbed it using object.stub(:foo).with(y)

2010-09-19 Thread Myron Marston
The current behavior of rspec-mocks causes a NoMethodError when you call object.foo(x) after setting up a stub using object.stub(:foo).with(y). Here's an example for when this has caused me a problem: - In a before(:each) block, I've setup a stub: File.stub(:exist?).with("config.yml").and_return(

Re: [rspec-users] How to use RSpec 2 with Sinatra 1.0

2010-09-19 Thread David Chelimsky
On Sep 19, 2010, at 4:38 AM, Maurizio De Santis wrote: > Hello, > > I am trying to use RSpec 2 with a Sinatra 1.0 application, but I have > no idea about whether they are compatible or not. I tried this: > > in $SINATRA_APP_ROOT/app.rb: > > require 'sinatra' > > set :app_file, __FILE__ > set :

Re: [rspec-users] undefined method `has_selector?' for "":String

2010-09-19 Thread David Chelimsky
On Sep 19, 2010, at 12:44 PM, Lord Raiden wrote: > I'm running rails 3.0.0 on ruby 1.9.2p0. > > I've rspec beta 22 with Capybara 0.3.9. NO WEBRAT. > > I'm unable to use 'rendered.should have_selector('a') in my view specs. > > 1) home/_menu.erb should add a link to home first > Failure/Err

[rspec-users] undefined method `has_selector?' for "":String

2010-09-19 Thread Lord Raiden
I'm running rails 3.0.0 on ruby 1.9.2p0. I've rspec beta 22 with Capybara 0.3.9. NO WEBRAT. I'm unable to use 'rendered.should have_selector('a') in my view specs. 1) home/_menu.erb should add a link to home first Failure/Error: rendered.should have_selector('a', 'Home') undefined me

Re: [rspec-users] is it Mailing list on github for oauth on twitter

2010-09-19 Thread babar shahzad
thanX a Lot David :-) Babar Shahzad Chaudary, +358465825630 Deptt of Information Processing Science, University of Oulu, Finland. From: David Chelimsky To: rspec-users Sent: Sat, September 18, 2010 7:28:45 AM Subject: Re: [rspec-users] is it Mailing lis

[rspec-users] How to use RSpec 2 with Sinatra 1.0

2010-09-19 Thread Maurizio De Santis
Hello, I am trying to use RSpec 2 with a Sinatra 1.0 application, but I have no idea about whether they are compatible or not. I tried this: in $SINATRA_APP_ROOT/app.rb: require 'sinatra' set :app_file, __FILE__ set :root, File.dirname(__FILE__) set :config_path, File.join(Sinatra::Applicatio

Re: [rspec-users] is it Mailing list on github for oauth on twitter

2010-09-19 Thread James Martin
On Sat, Sep 18, 2010 at 8:33 PM, babar shahzad wrote: > > Helo dear list members, > > Can you kindly confirm me that its the correct list I subscribed to. I want > help in twitter oauth. I am using abraham williams' library. If something > wrong, I will be very thankful if you could write me link

Re: [rspec-users] [Rails] rails view helpers, BDD, and what to mock

2010-09-19 Thread J. B. Rainsberger
On Fri, Sep 17, 2010 at 16:48, Doug E. wrote: > I'm trying to understand BDD and proper testing technique. I'm testing > a rails view helper method that checks user roles to see if a link > should be shown. I'm using rails 2.3.8 and rspec version 1.3.0. My > helper looks like this: > > # welcom