similar to: using rSpec stub in Cucumber with rSpec2

Displaying 20 results from an estimated 1100 matches similar to: "using rSpec stub in Cucumber with rSpec2"

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 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 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.
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
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:
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 understand if this
2009 May 04
6
cucumber - when to stub/mock
I''m just curious about this, since my solution involved stubbing a call to GeoIp. Is there a good rule of thumb for when you make exceptions to the ''no stubbing'' philosophy of Cucumber? My step was: "Given I am accessing the site from Japan," but I can think of other situations - mostly when interacting with web services, that I''d probably
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
2009 Feb 25
5
[Cucumber] pretty html output?
Cucumberists (and RSpec Classic users ;): How can we convert a Cucumber feature file into HTML with syntax highlighting? Not the test-runner output; that''s preprocessed so it does not match the input file... Tx! -- Phlip
2011 Jan 14
2
Rspec autotest error
Hi all, I tried testing with Rspec for first time, following a tutorial. "rspec spec/" works fine but when I try ''autotest'' it gives me the error message below. I also made a gist about it: https://gist.github.com/779265 It seems like a redgreen or ZenTest error. I''m using Ubuntu10, Rails3, Ruby 1.9 and RVM. Any help is appriciated, thanks in advance, gezope
2012 Feb 02
1
Missing files with rails generate cucumber:install
when ranning cucumber:install and generate me this files <code> create config/cucumber.yml create script/cucumber chmod script/cucumber create features/step_definitions create features/support create features/support/env.rb exist lib/tasks create lib/tasks/cucumber.rake gsub config/database.yml gsub config/database.yml force config/database.yml </code> im searching for the
2008 Sep 29
3
rspec-ui overlap with cucumber?
Hi! I''m using cucumber + selenium and I love it. However I''m looking to add some methods (example: click_and_wait etc) to the lib. Therefore looked around a bit and I got two questions: Firstly about rspec-ui, I''m a little confused, does rspec-ui overlap with its propose with webrat with cucumber or I''m missing a point? Secondly, are there any plans to
2009 Feb 13
2
[cucumber][v0.2alpha]Where could I find API docs for custom formatters?
Hi, I''m working on update my local Cucumber to the latest version. But it seems the old formatter APIs(step_failed, scenario_executed, etc.) don''t work any more. Are there some documents or even Cucumber source code I can refer to? Thanks in advance, Liu -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Nov 03
2
Cucumber and autotest
Hey all, Does anyone know how to disable the cucumber autotest support on a project? With this commit: http://github.com/aslakhellesoy/cucumber/commit/93470e2580b5e3cfe0c8eb3fce86e21bf8afa219 The cucumber features are worked into the autotest cycle automatically. This is cool, but on some projects I don''t think it fits well with my red->green->refactor cycle. Any ideas on
2009 Apr 27
2
uninitialized constant ActionController running Cucumber features in Aptana/RadRails IDE
I''m just starting on BDD. I installed the gems for webrats and cucumber. I also ran the following in the Ruby shell: >rake gems:install RAILS_EN=test >script/generate cucumber These commands seemed to create the expected features and lib folders in my project. I''m using the eclipse framework with Aptana and RadRails as my IDE. However, when I run: >cucumber features
2009 Mar 18
2
Cucumber failing with ''uninitialized constant Spec::Ruby''
I''ve just upgraded RSpec to 1.2 on a Rails 2.2.2 app. rake features fails with the following error: /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ dependencies.rb:442:in `load_missing_constant'': uninitialized constant Spec::Ruby (NameError) from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:77:in
2009 Feb 02
5
[Cucumber] Cucumber and acts_as_xapian
Hey list, Anyone have experience with acts_as_xapian and Cucumber? I''m struggling with updating xapian''s index, to actually "find" fluff that has been indexed.. In a scenario, I''m adding a bunch of articles, and in the actual search step, I run: When "I search for \"$query\"" do |query| %x[rake RAILS_ENV=test xapian:update_index]
2009 Mar 25
5
[Cucumber] ANN: Cucumber with pure Java
Big news for all Java programmers out there. Now you can use Cucumber with pure Java! That''s right, you don''t have to write a single line of Ruby! (1) All of your step definitions can be written as annotated methods in POJOs (Plain Old Java Objects). To get a taste of what this looks like, check out the simple example in the cucumber_java project on GitHub: * README for
2009 Sep 16
1
Problems while loading 'spec/stubs/cucumber'
Rodrigo Flores wrote: > Hi > > I''m reading the rspec book and I''m having problems when I require the > file ''spec/stubs/cucumber''. When I go to an IRB prompt and type > require ''spec/stubs/cucumber'' after requiring another libraries [1] I > get the false in ''spec/expectations'' and an error in >
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