Re: [rspec-users] RSpec2 collides with Runt but why ?

2011-03-18 Thread Rob Westgeest
I know why now. It was me to blame (of course). Error message about the VERSION constant and the Diff is not a module could be more clear though. There's something strange going on in the Spec module check in core/configuration.rb I narrowed it down to a small example: Given: module MyModule cl

[rspec-users] RSpec2 collides with Runt but why ?

2011-03-18 Thread Rob Westgeest
Hi, A project of mine is using Runt expressions to match dates. When upgraded my rake tasks to 2.5.1 (from 1.3.0) it get this /usr/bin/ruby1.8 -S rspec spec/delivery_spec.rb spec/reporter_spec.rb spec/mysql_dump_spec.rb spec/string_ext_spec.rb spec/ backup_configuration_spec.rb spec/postgres_dump

Re: [rspec-users] 'spec' command not working

2011-03-18 Thread Will C.
Will C. wrote in post #988062: > When I run JSpec, in the command prompt, using the "spec" command, I get > this error: > > 'spec' command not recognized as a command > > I have the latest versions of JSpec and Ruby installed. How can I use > the spec command? Not sure what to put in my PATH enviro

Re: [rspec-users] RSpec Basic Help Needed

2011-03-18 Thread David Kahn
On Fri, Mar 18, 2011 at 12:34 PM, Will C. wrote: > I'm getting the following error while doing the RSpec example on the > bottom of this page: http://rspec.info/ > > This is the error I am getting > no such file to load -- blowing LoadError > Do you have the file named right? (I see 'blowing' ab

Re: [rspec-users] Rails 3 Upgrade

2011-03-18 Thread Dzsó Pengő
Hey guys! I got a serious issue right after upgraded to rails 3. Rails doesn't render layout, just only if I explicitly add this line to actions at end of actions. render :layout=>"application" If I place layout "application" to the controller doesn't work, but I think it must have to work wi

[rspec-users] RSpec Basic Help Needed

2011-03-18 Thread Will C.
I'm getting the following error while doing the RSpec example on the bottom of this page: http://rspec.info/ This is the error I am getting no such file to load -- blowing LoadError Both files are on the desktop. Thanks! -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] Controller Spec & DataMapper Chaining

2011-03-18 Thread Ken Chien
When calling get/post/etc, the second optional parameter is a hash representing the "params" hash. So, in order to test the conditional(s) in your controller, you should write: get :index, :alpha => true #test the first conditional In another example, pass in :beta => true like this: get

Re: [rspec-users] 'spec' command not working

2011-03-18 Thread Will C.
Aslak Hellesøy wrote in post #988109: > What's JSpec? > > Aslak Oh sry I mean RSpec -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] 'spec' command not working

2011-03-18 Thread Matt Wynne
On 18 Mar 2011, at 16:31, Will C. wrote: > Will C. wrote in post #988062: >> When I run JSpec, in the command prompt, using the "spec" command, I get >> this error: >> >> 'spec' command not recognized as a command >> >> I have the latest versions of JSpec and Ruby installed. How can I use >> th

Re: [rspec-users] Controller Spec & DataMapper Chaining

2011-03-18 Thread Sid Wood
Thanks for the replies guys. My problem is writing a test for @widgets = @widgets.by_alpha(params[:alpha]) DataMapper allows you to chain additional criteria on an existing query and doesnt execute that query until in is used in the view. So the above statement gets baked into the previous defau

Re: [rspec-users] 'spec' command not working

2011-03-18 Thread Will C.
Will C. wrote in post #988062: > When I run JSpec, in the command prompt, using the "spec" command, I get > this error: > > 'spec' command not recognized as a command > > I have the latest versions of JSpec and Ruby installed. How can I use > the spec command? Not sure what to put in my PATH enviro

Re: [rspec-users] Functional Tests with custom routes

2011-03-18 Thread Brian Ledsworth
...not the place to do this, and I should do it in Cucumber or something? Yes! Tthe concept of testing controllers, views and models separately, is related to isolation of concerns. Your controller test is just that, testing the controller, regardless of routing, views, models, etc. You're u

Re: [rspec-users] Controller Spec & DataMapper Chaining

2011-03-18 Thread Ken Chien
What problems are you running into? It appears that you should stub out Widget.all before all examples, unless you really want to hit the database. Ken 2011/3/18 Sid Wood > Hi there, > > I'm fairly new to RSpec, and DataMapper and I'm trying to write a > controller spec for an index action t

Re: [rspec-users] Controller Spec & DataMapper Chaining

2011-03-18 Thread Brian Ledsworth
Would you post the results of your spec? I'd like to see what you're getting. I'm not familiar with DataMapper, but from an Active Record standpoint, the order clause does not look right. e.g. should be Square.all.order(:name) Try running the spec without the order clause in index (e.g. Widget.

[rspec-users] Functional Tests with custom routes

2011-03-18 Thread Paul H.
Say I have a custom route like this... map.connect 'item/:id/some_action', :controller => 'object', :action => 'change_color', :conditions => {:method => :put} I've been writing my tests like this... describe ObjectController describe "PUT item/:id/some_action" do [...] put :chang

Re: [rspec-users] Are there any ways to detect spec faults during a run?

2011-03-18 Thread Magnus Erickson
2011/3/15 David Chelimsky > On Mar 15, 2011, at 5:25 AM, Magnus Erickson wrote: > > > 2011/3/13 David Chelimsky > >> On Mar 9, 2011, at 6:00 AM, Magnus Erickson wrote: >> >> > Hi, >> > Is there a way to detect if an example has failed? Something like a: >> "example_failed?" method. >> > In my ca

[rspec-users] Controller Spec & DataMapper Chaining

2011-03-18 Thread Sid Wood
Hi there, I'm fairly new to RSpec, and DataMapper and I'm trying to write a controller spec for an index action that will include DM query chaining. Here is a very simplified version of the Controller#index I'm working on def index @widgets = Widget.all(:order => [ :name.asc ]) if params[:a

Re: [rspec-users] 'spec' command not working

2011-03-18 Thread Evgeniy Dolzhenko
If your question is related to "JSpec JavaScript Testing Framework" this is the wrong group to post to, you should post to http://groups.google.com/group/jspec instead On 3/18/2011 11:01 AM, Aslak Hellesøy wrote: What's JSpec? Aslak On Mar 18, 2011, at 1:35, "Will C." wrote: When I run JS

Re: [rspec-users] 'spec' command not working

2011-03-18 Thread Aslak Hellesøy
What's JSpec? Aslak On Mar 18, 2011, at 1:35, "Will C." wrote: > When I run JSpec, in the command prompt, using the "spec" command, I get > this error: > > 'spec' command not recognized as a command > > I have the latest versions of JSpec and Ruby installed. How can I use > the spec command? No