Re: [rspec-users] Use filters to wrap examples into a pending block?

2010-12-23 Thread Jeroen van Dijk
d Suddenly my test suite was mega fast and I had no failing specs... oops :-) Cheers On Thu, Dec 23, 2010 at 12:40 PM, Jeroen van Dijk < jeroentjevand...@gmail.com> wrote: > Found the answer by looking at the features: > > RSpec.configure do |c| > c.around do |example|

Re: [rspec-users] Use filters to wrap examples into a pending block?

2010-12-23 Thread Jeroen van Dijk
t 11:57 AM, Jeroen van Dijk < jeroentjevand...@gmail.com> wrote: > Hi all, > > I was wonder whether something like the following is possible in RSpec? > > RSpec.configure do |c| > c.filter_examples : pending_for_some_reason => lambda {|example| > pending "Th

[rspec-users] Use filters to wrap examples into a pending block?

2010-12-23 Thread Jeroen van Dijk
Hi all, I was wonder whether something like the following is possible in RSpec? RSpec.configure do |c| c.filter_examples : pending_for_some_reason => lambda {|example| pending "This example is failing due to upgrade of x" do example.call end } end it "should succeed, but proba

Re: [rspec-users] undefined method `blueprint' with rspec/machinist/faker

2009-06-24 Thread Jeroen van Dijk
Hi Yoann, It might help if you post the actual code. The error you have could be caused by nearly everything. Cheers, Jeroen On Wed, Jun 24, 2009 at 3:13 AM, Yoann-Z wrote: > Hi, > > I just started using Machinist for my project. So I successfully > installed notahat-machinist and faker gems a

[rspec-users] [cucumber] fat client continued(?)

2009-05-18 Thread Jeroen van Dijk
Hi All, I'm looking for a cucumber (browser) client where the product owner can browse/edit features and see the status of the features. So far I tried the rcumber plugin (found here http://wiki.github.com/aslakhellesoy/cucumber/related-tools) which more or less does what I want but still in a ve

Re: [rspec-users] Mocking base class methods

2009-03-21 Thread Jeroen van Dijk
hat would your test strategy be? (The code is actually part of a small plugin I'm writing and can be found here http://github.com/jeroenvandijk/find_by_params/blob/5a97028c505d9254b2bcbe5e3aa5b801f7ca34ca/lib/find_by_params.rb ) Jeroen PS I'm a TDD beginner so feel free correct me :) > > > > On Th

Re: [rspec-users] Mocking base class methods

2009-03-20 Thread Jeroen van Dijk
=> 3, :bar => 4 } @base = ActiveRecord::Base @result = mock("query results", :count => 1) @base.expects(:scoped_by_params).with(params, options).returns(@result) @base.count_by_params(params, options) end On Thu, Mar 19, 2009 at 5:35 PM, Jeroen van Dijk wr

Re: [rspec-users] Mocking base class methods

2009-03-19 Thread Jeroen van Dijk
Hi all, I'm having the same problem as Tobi and I wanted to try Tobi mock solution but unfortunately it does not work for me. Here is a trivial example I want to test: module ActiveRecord class Base def self.count_by_params(params = {}, options = {}) scoped_by_params(params).co

[rspec-users] Refactoring and using each

2008-10-08 Thread Jeroen van Dijk
Hi all, I'm new to this list and new to RSpec so I have been trying out RSpec the last couple of days and I find it very a natural way of testing. So first of all thanks for providing this framework. Now, I have written some tests for my controllers and models and I saw myself writing similar cod