search for: rspec2

Displaying 19 results from an estimated 19 matches for "rspec2".

Did you mean: rspec
2010 Mar 14
2
autotest & rspec2
Hi guys, I''m trying to find some information on how to get autotest to run the rspec2 tests. I have my project setup so "rake spec" runs the specs properly, but autotest seems to ignore/don''t know that there are specs to test. I read on the rspec2 wiki that autotest integration is o be added eventually. Any ideas on how to achieve this? Thanks, Jeroen
2010 Jul 01
1
using rSpec stub in Cucumber with rSpec2
...here I want to use rSpec stubs in a Cucumber feature. Unfortunately it looks like requiring ''spec/stubs/cucumber'' in env.rb does not work anymore: I get a "no such file to load -- spec/stubs/cucumber (LoadError)" error. Is it possible to use rSpec stubs in Cucumber with rSpec2? If not, is there any other viable alternative? Thanks for your help :) Florent -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100701/08aa52e5/attachment.html>
2010 Nov 16
4
view.should render_template best practices?
I''ve been looking for the definitive answer for months now, and the RSpec book doesn''t touch on it at all: How do we now handle stubbing out rendering of partials in view specs in RSpec2? I have a large (35K+ lines of views and related specs) that I''m trying to upgrade to Rails3/RSpec2. My views use partials pretty extensively and this issue is a huge blocker for me. before do view.should render_template("event_list", :locals => {:calendar => @calendar...
2010 Aug 11
6
rspec2 not working with shoulda
I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta. 19" . I have following code at spec/models/user_spec.rb require ''spec_helper'' describe User do it { should validate_presence_of(:email) } it { should validate_presence_of(:name) } end Here is my gemfile group :development, :test do gem ''factory_girl_rails'',
2010 Oct 28
0
Autotest+RSpec2+Win32console = no color
I have the same problem with the combination above with Ruby 1.9.2 on Windows XP, as described here: http://www.ruby-forum.com/topic/205569 Calling Rspec directly produces colored output, but autotest spits out ANSI sequences. The issue was supposed to be closed with win32console 1.3.0, but obviously it didn''t for the above-mentioned combination. -- Posted via
2011 Dec 02
0
Testing Views with Rails 3 and Rspec2 - Can't stub request.path_params[:controller]
I am stuck to test a specific view which contains a request.path_parameters[:controller] variable as the example below follows: <%=link_to "Store", admin_stores_url, { :id => "tab-3" ,:class => (admin_stores_path == ''/'' + request.path_parameters[:controller] && ''active'')} %> The rspec view test file: describe
2010 Oct 06
2
rspec2 observations
Just a few observations now that I have completed the upgrade from RSpec-1 to RSpec-2. 1. In my project (2800 examples across about 40 files), MRI 1.9.2-p0 takes roughly 3 times longer to complete the spec run. Runtimes grew from 2.2s (rspec 1.3.0) to 6.1s (2.0.0.rc). 2. Rubinius 1.1.0 runs RSpec-2 without error. 3. JRuby 1.5.1 runs RSpec-2 without error. 4. Both Rubinius and JRuby print a
2011 Mar 02
6
calbacks on models
Hi, I''m having some strange behavior on callbacks when testing with RSpec2. On my test, when I create a resource using the #create method the callbacks related to #before_create are not called. If I go to the console and I try to type the command Resource.create(client_uri: "http://example.com") all works fine. There are no mocks around, and I can''t un...
2007 Sep 12
4
Checking out Rspec
I''m getting the following error when i either checkout or update from svn://rubyforge.org/var/svn/rspec/trunk svn: Error processing command ''mv'' in ''C:\work\rspec2\RSpec.tmbundle\Preferences'' svn: Can''t move source to dest svn: Cannot rename file ''C:\work\rspec2\RSpec.tmbundle\Preferences\.svn\tmp\text-base\Symbol List: Behaviour.tmPreferences.svn-base'' For what i am doing right now, i was able to workaround this by checki...
2011 Feb 25
7
Rspec2 for rails 2.3.8?
Hi experts, I picked up a copy of the rspec book and wrote some tests in spec/lib and spec/models for my Rails 2.3.8 code. I was using rspec 2.5.1, rspec-core 2.5.0, rspec-expectations 2.5.0 et. al. But I realised that the rspec-rails version I am using is meant for Rails3. Which version of rspec-rails should I use for Rails 2.3.8? Best, Radhesh -- Posted via http://www.ruby-forum.com/.
2011 Jan 14
2
Rspec autotest error
...9;' from /home/vadkant/.rvm/gems/ruby-1.9.2-p0/gems/ZenTest-4.4.2/lib/ autotest.rb:304:in `each'' from /home/vadkant/.rvm/gems/ruby-1.9.2-p0/gems/ZenTest-4.4.2/lib/ autotest.rb:304:in `initialize'' from /home/vadkant/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.3.1/lib/ autotest/rspec2.rb:10:in `initialize'' from /home/vadkant/.rvm/gems/ruby-1.9.2-p0/gems/rspec-rails-2.3.0/lib/ autotest/rails_rspec2.rb:31:in `initialize'' from /home/vadkant/.rvm/gems/ruby-1.9.2-p0/gems/ZenTest-4.4.2/lib/ autotest.rb:236:in `new'' from /home/vadkant/.rvm/gems/ruby-1.9.2-...
2010 Sep 30
5
response.should have_text leads to undefined method `has_text?'
One of my controllers directly renders some JSON output that I would like to test with RSpec. For that I use ''response.should have_text("foobar")'' in my spec file, but that leads to a Failure/Error: response.should have_text("enim") undefined method `has_text?'' for #<ActionController::TestResponse: 0xb6736944> I read here somewhere that webrat
2012 Apr 15
5
JQuery-rails gem spec removal
Hi there, I don''t know if this is the right place to discuss such a topic. I''ve suggested to remove jquery-rails spec folder, since it hasn''t got any tests, they are not adapted to RSpec2 and not even to latest rails. They are one year old and it contains only one empty test. I have an application that runs all tests on all engines, being jquery-rails one of them. I have to explicitly skip this engine since tests are not passing, and given that they aren''t useful at all I...
2010 Dec 12
0
rspec-2.3.0 is released
rspec-2.3.0 is released (including rspec, rspec-core, rspec-mocks, rspec-expecations and rspec-rails). ### rspec-core-2.3.0 / 2010-12-12 [full changelog](http://github.com/rspec/rspec-core/compare/v2.2.1...v2.3.0) * Enhancements * tell autotest to use "rspec2" if it sees a .rspec file in the project''s root directory * replaces the need for ./autotest/discover.rb, which will not work with all versions of ZenTest and/or autotest * config.expect_with * :rspec # => rspec/expectations * :stdlib # =&gt...
2011 Jul 27
0
--profile and ci
...of my ci builds. Is there some way to direct this particular output to a file/folder? Is there anything that produces an html version of this output e.g. a formatter? I''d be interested to know why --profile is not a formatter (its not a formatter in I''m using Jenkins for Ci and rspec2, on a rails app TIA Andrew -- ------------------------ Andrew Premdas blog.andrew.premdas.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110727/ecdc0adf/attachment.html>
2011 Nov 18
1
What does :count actually mean in assert_select?
Hi guys, I tried reading up the RSPEC Book (Dec 2010) and googled a bit but I could not find anything. I''m using Rspec2. Example: spec/factories/categories.rb ====================== FactoryGirl.define do factory :category_intakes, :class => ''category'' do name ''intakes and filters'' description ''airfilters and etc.'' created_by 1 upd...
2010 Apr 15
11
Rails 3, Rspec 2, Autotest
Trying to set up a Rails 3 project with RSpec and Autotest. I followed these steps exactly: http://gist.github.com/365816 But when I start up autotest, I get: $ autotest loading autotest/rails style: Rails instead of: $ autotest loading autotest/rails_rspec2 style: RailsRspec2 And autotest doesn''t seem to do anything. Any idea what''s happening? I''m using Ruby 1.9.2-head in rvm. Relevant gems: autotest (4.2.9) autotest-rails (4.1.0) rspec (2.0.0.beta.6) rspec-core (2.0.0.beta.6) rspec-expectations (2.0.0.beta.6) rspec-mock...
2011 Oct 26
1
problem profiling rspec boot time with ruby-prof
We recently upgraded to rspec2 / rails 3 and our specs are taking a very long time to run. It takes nearly 12 minutes before the first dot comes out. Before the upgrade, our entire suite of 6000+ specs would run in about 6 minutes. The majority of the delay seems to be during the loading of the spec files. Adding instrumenta...
2011 Sep 07
3
Method get of ActionController::TestCase ignores routes.rb?
Hi! I''m running into issue which seems to indicate that ActionController::TestCase.get() method ignores what I have in routes.rb. Happens in 3.0.10 and 3.1.0 too. I have the following RSpec2 test of my XmlRpcController#index action: it "should get nothing in response to GET request" do get :index response.response_code.should == 400 #bad_request end And the only line related to this route in routes.rb is: post ''rpc'', :to => "xml_rpc#index&quot...