[rspec-users] request for feedback

2010-06-14 Thread David Chelimsky
Hey all, If you're interested in seeing rspec-2 get an API like cucumber tags, please comment on http://github.com/rspec/rspec-core/issues#issue/37. Cheers, David ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listi

[rspec-users] blog post on filtering examples in rspec-2

2010-06-14 Thread David Chelimsky
Hey all, Here's a post on filtering examples in rspec-2: http://blog.davidchelimsky.net/2010/06/14/filtering-examples-in-rspec-2/ Cheers, David ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] undefined local variable or method `assigns'

2010-06-14 Thread Kristian Mandrup
Thanks again David :) Pure magic to me, I don't really understand how/ why that makes it work. But it does! On Jun 14, 2:30 am, David Chelimsky wrote: > On Jun 13, 2010, at 5:32 PM, Kristian Mandrup   > wrote: > > > > > shared_examples_for "a template that renders the messages/form > > partial"

Re: [rspec-users] Testing render :update

2010-06-14 Thread David Chelimsky
On Jun 14, 2010, at 7:05 PM, David Chelimsky wrote: > On Jun 14, 2010, at 6:40 PM, Marcelo de Moraes Serpa wrote: > >> Hey guys. >> >> I would like to test the following behavior: >> >> render :update do |page| >>page.replace_html 'errors', :partial => 'signup_errors', :local

Re: [rspec-users] Testing render :update

2010-06-14 Thread David Chelimsky
On Jun 14, 2010, at 6:40 PM, Marcelo de Moraes Serpa wrote: > Hey guys. > > I would like to test the following behavior: > >render :update do |page| > page.replace_html 'errors', :partial => 'signup_errors', :locals > => { :errors => 'errors'} > end > } >

Re: [rspec-users] Testing render :update

2010-06-14 Thread Phillip Koebbe
On 2010-06-14 6:40 PM, Marcelo de Moraes Serpa wrote: Hey guys. I would like to test the following behavior: render :update do |page| page.replace_html 'errors', :partial => 'signup_errors', :locals => { :errors => 'errors'} end } I'm doing: controller.

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Marcelo de Moraes Serpa
Thanks David and Trey ;) Marcelo. On Mon, Jun 14, 2010 at 4:05 PM, David Chelimsky wrote: > The primary concepts are example groups and examples. An example group is a > group of examples. More technically, an example group is a class, and > examples are instances of that class. > > * example_gr

[rspec-users] Testing render :update

2010-06-14 Thread Marcelo de Moraes Serpa
Hey guys. I would like to test the following behavior: render :update do |page| page.replace_html 'errors', :partial => 'signup_errors', :locals => { :errors => 'errors'} end } I'm doing: controller.should_receive(:render).with(:update) But I am not sure on

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread David Chelimsky
The primary concepts are example groups and examples. An example group is a group of examples. More technically, an example group is a class, and examples are instances of that class. * example_group, context, and describe all mean the same thing. * example, specify, and it all mean the same th

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Marcelo de Moraes Serpa
Ah! I thought I could use it / describe / context interchangeably. Thanks, Marcelo. On Mon, Jun 14, 2010 at 3:04 PM, Trey Bean wrote: > It looks like you need to put those lines in an it block. > > it 'should...' do > token... > end > > Trey > > On Jun 14, 2010, at 1:05 PM, Marcelo de Moraes

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Trey Bean
It looks like you need to put those lines in an it block. it 'should...' do token... end Trey On Jun 14, 2010, at 1:05 PM, Marcelo de Moraes Serpa wrote: > Hello list, > > I have this very simple model spec: > > require 'spec_helper' > > describe Token do > describe "Associations" do >

[rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Marcelo de Moraes Serpa
Hello list, I have this very simple model spec: require 'spec_helper' describe Token do describe "Associations" do token = Token.new token.should respond_to(:user) end end When I run it, I get the following error: /spec/models/token_spec.rb:7: undefined method `respond_to' for Spec

Re: [rspec-users] I'm having a couple of nuisance things happening with jruby and rspec

2010-06-14 Thread Greg Ditrick
Jay, Yes, I have done this and yes I don't get any error messages. But the command ran from rake fails and rake aborts. It is like the rake task in rspec using Kernal.system is returning with a negative false here in the code: line 176 in lib/spec/rake/spectask.rb unless system

Re: [rspec-users] I'm having a couple of nuisance things happening with jruby and rspec

2010-06-14 Thread Jay McGaffigan
hmm.. for issue 1) I've found that rake doesn't always give an informative message I've gotten better messages when I run the spec command directly: if you run rake spec you might see something like this after your tests run Command /Users/home/Projects/jruby/jruby-1.5.0/bin/jruby -I"spec:lib" "

[rspec-users] I'm having a couple of nuisance things happening with jruby and rspec

2010-06-14 Thread Greg Ditrick
Hi all, I have a couple of things that are happening when using jruby. 1) I consistently getting a 'Command failed' raised when using rake. The Kernel.system() call on line ~ 176 of lib/spec/rake/spectask.rb is always returning false. I'm not sure why. The specs run and work. Does anyone or

Re: [rspec-users] Method stub return values for message expectations

2010-06-14 Thread Tom Stuart
On 13 Jun 2010, at 21:20, David Chelimsky wrote: >> But as of http://github.com/dchelimsky/rspec/commit/386e334 (i.e. in 1.3.0) >> it no longer works when the stub uses an argument matcher: > Please report to http://rspec.lighthouseapp.com for rspec-1 and > http://github.com/rspec/rspec-mocks for