Re: [rspec-users] No Method Error

2013-11-22 Thread David Chelimsky
Is it that you don't understand the error message or you don't understand what to do about it? On Fri, Nov 22, 2013 at 9:39 AM, Richard Jones wrote: > Hi, > > I'm getting the error below, can someone explain what I need to do? > > Failure/Error: @numbers.exchange(1).should be_true > NoMethodErr

Re: [rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

2013-10-24 Thread David Chelimsky
The lighthouse tracker was shut down years ago, sorry. But you can learn about what works and what doesn't re: nested before/after hooks from https://www.relishapp.com/rspec/rspec-core/docs/hooks and http://rubydoc.info/gems/rspec-core/RSpec/Core/Hooks. Feel free to ask any specific questions here

Re: [rspec-users] renders new/edit user_mst form

2013-06-10 Thread David Chelimsky
On Mon, Jun 10, 2013 at 5:53 AM, oliver wrote: > C:\Documents and Settings\Oliver\Desktop\ams>rspec > spec/views/user_msts/new.html > .erb_spec.rb:19 --backtrace > Run filtered including {:line_number=>19} > F > > Failures: > > 1) user_msts/new.html.erb renders new user_mst form > Failure/

Re: [rspec-users] renders new/edit user_mst form

2013-06-10 Thread David Chelimsky
On Mon, Jun 10, 2013 at 5:18 AM, oliver wrote: > # ./app/views/employee_msts/new.html.erb:3:in > `_app_views_employee_msts_new > _html_erb__385952098_22995768_655956278' > # > C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp > late.rb:135:in `block in render' >

Re: [rspec-users] renders new/edit user_mst form

2013-06-10 Thread David Chelimsky
On Mon, Jun 10, 2013 at 5:09 AM, oliver wrote: > > > --- On *Mon, 6/10/13, David Chelimsky-2 [via Ruby] <[hidden > email]<http://user/SendEmail.jtp?type=node&node=4991637&i=0> > >* wrote: > > > From: David Chelimsky-2 [via Ruby] <[hidden &g

Re: [rspec-users] renders new/edit user_mst form

2013-06-10 Thread David Chelimsky
On Mon, Jun 10, 2013 at 4:39 AM, oliver wrote: > def new > @user_mst = UserMst.new > @group_mst = GroupMst.all > Under normal circumstances, this line ^^ would assign @group_mst an empty collection, not nil, so something is wrong with the way things are set up/configured. What happens

Re: [rspec-users] renders new/edit user_mst form

2013-06-10 Thread David Chelimsky
On Mon, Jun 10, 2013 at 4:25 AM, oliver wrote: > <%= f.select :group_name, > options_for_select(@group_mst.collect{|x| [x.group_name]}), {:multiple => > :multiple} %> > > that is on the line 44. > And the error raised on that line says "The error occurred while evaluating nil.collect". The only

Re: [rspec-users] renders new/edit user_mst form

2013-06-10 Thread David Chelimsky
On Mon, Jun 10, 2013 at 3:47 AM, Oliver Jesus wrote: > Hello! I need a little help. > > If I run my rspec (rspec spec --backtrace) I've got error like this. > Please help my. I greatly appreciated your answers. > > Finished in 14.39 seconds > 173 examples, 6 failures, 5 pending > > Failed examples

Re: [rspec-users] How to generate TAP output for Selenium-WebDriver TC written in Ruby

2013-06-09 Thread David Chelimsky
On Sun, Jun 9, 2013 at 12:29 AM, Prasun Prabhakar wrote: > Hello, > > We need to integrate Jenkins with TestLink. For now Iam able to run > Selenium-WebDriver test cases from Jenkins using the inputs from > TestLink. Now the problem is the reverse communication where the Jenkins > test result need

Re: [rspec-users] Error uccored while evaluating nil.collect

2013-06-07 Thread David Chelimsky
On Fri, Jun 7, 2013 at 5:02 AM, Oliver Jesus wrote: > Hello, I am new to RSpec and I've got error something like this: > You have a nil object when you didn't expect it! > You might have expected an instance of Array. > The error occurred while evaluating nil.collect > > In my controller: > > def

Re: [rspec-users] Fuzzy should_receive matching

2013-05-30 Thread David Chelimsky
On Thu, May 30, 2013 at 2:44 AM, Alexander Baronec wrote: > Hello. > I have a test problem when I should test arguments in method not by exact > matching buy with fuzzy matching. > > For example I have this test: > > require 'rspec' > > describe do > it do > o = Object.new > o.should_re

Re: [rspec-users] Different description in custom RSpec::Matcher depending on output formater

2013-04-10 Thread David Chelimsky
On Tue, Apr 9, 2013 at 3:50 PM, Ervin Weber wrote: > Hello is it possible to make something like following: > > RSpec::Matchers.define :be_json do |expected| > match do |actual| > JSON.parse(actual) == expected > end > > description do > if html? # to html formatter output this >

Re: [rspec-users] Rspec + Devise + BaseController

2013-03-20 Thread David Chelimsky
On Wed, Mar 20, 2013 at 11:21 AM, Ezequiel Delpero wrote: > Finally I could solve the problem. The problem was on the definition of > the anonymous controller on the spec: > > instead of: > > controller do > def index > end > end > > I used: > > controller(Admins::Base) do

Re: [rspec-users] Assign default tag

2013-03-19 Thread David Chelimsky
On Tue, Mar 19, 2013 at 9:52 AM, Perry Smith wrote: > > On Mar 19, 2013, at 10:41 AM, David Chelimsky wrote: > >> On Tue, Mar 19, 2013 at 7:20 AM, Иван Неверов wrote: >>> Hi all >>> Could somebody tell me, is it possible to assign some tag=>value to all >&

Re: [rspec-users] Assign default tag

2013-03-19 Thread David Chelimsky
On Tue, Mar 19, 2013 at 7:20 AM, Иван Неверов wrote: > Hi all > Could somebody tell me, is it possible to assign some tag=>value to all > examples in directory? > > Like I want to mark all tests in spec/unit as :type=>'shallow'. And have > some tests in other directory also with type shallow (assi

Re: [rspec-users] stubbed methods are not returning what I've stubbed them to return

2013-03-16 Thread David Chelimsky
y error is "private method `random_string' called for >> Sinatra::Application:Class". >> >> So, like I said, looks to me like a Sintra specific issue where I need to >> reference it in a certain way. It's such a small method, I don't really >&g

Re: [rspec-users] stubbed methods are not returning what I've stubbed them to return

2013-03-16 Thread David Chelimsky
On Sat, Mar 16, 2013 at 7:56 AM, Dan Brooking wrote: > I'm working on a small Sintra app and am having trouble getting my stub to > return what I want it to. I've been searching and found quite a few with > this question but no real answers. I also posted this to the sinatrarb > google group in

Re: [rspec-users] Help solve distributed cucumber feature pain in 2 minutes or less

2013-03-11 Thread David Chelimsky
You'll probably get more and better feedback from https://groups.google.com/forum/?fromgroups#!forum/cukes On Mon, Mar 11, 2013 at 3:31 PM, Dan Williams wrote: > Hey everybody, > > I have been beating my head on the wall when dealing with creating cucumber > features in a distributed work environ

Re: [rspec-users] Validation Failed: Userkey has already been taken, Email has already been taken

2013-02-28 Thread David Chelimsky
On Thu, Feb 28, 2013 at 12:57 PM, ruby rails wrote: > Hi, > > I am using Factory girl with rspec and capybara for testing my rails > appliction. I have the below code > FactoryGirl.define do > factory :user do |f| > f.email "s...@gmail.com" > f.userkey "12ssd345q62" > end > end > > When I

Re: [rspec-users] uninitialized constant Factory (NameError)

2013-02-28 Thread David Chelimsky
See https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md It's FactoryGirl, not Factory (which used to be the correct constant, but is no longer). On Thu, Feb 28, 2013 at 8:44 AM, ruby rails wrote: > I have installed factory_girl_rails gem in Gemfile for both test as well > a

Re: [rspec-users] Getting started

2012-11-19 Thread David Chelimsky
On Mon, Nov 19, 2012 at 7:22 AM, Suman I. wrote: > Hi I am new to using Cucumber. I am new to Ruby basically. This is an RSpec mailing list. Please send this query to the Cucumber mailing list: https://groups.google.com/group/cukes We're here if you have any RSpec questions. Cheers, David > >

Re: [rspec-users] Did I write my specs as I should?

2012-11-18 Thread David Chelimsky
On Sat, Nov 17, 2012 at 3:51 PM, dougui wrote: > Hello, > > I read a lot about rails and BDD and I think I've found my own path. I want > to share my method and to know what you think about that. > > This is my workflow : > > Creation of feature specs (example 1); > > Only the happy path > Test on

Re: [rspec-users] change() vs change{}

2012-10-24 Thread David Chelimsky
On Wed, Oct 24, 2012 at 12:26 PM, Kevin McCaughey wrote: > Hi, > > I am doing the rails tutorial and there is a line: > > expect { click_button submit }.not_to change(User, :count) > > When I looked up the rspec docs and book too, I found: > > change {} documentation (using curly brackets). Not s

Re: [rspec-users] Issues upgrading RSpec

2012-10-18 Thread David Chelimsky
On Thu, Oct 18, 2012 at 6:58 PM, Rodrigo Rosenfeld Rosas wrote: > My specs work fine with this in my Gemfile.lock: > > grep rspec Gemfile.lock > rspec (2.11.0) > rspec-core (~> 2.11.0) > rspec-expectations (~> 2.11.0) > rspec-mocks (~> 2.11.0) > rspec-core (2.11.0) >

Re: [rspec-users] How can I create a active-record model w/o depending on the database?

2012-09-23 Thread David Chelimsky
of the MyClass, so they > shouldn't have to be depending on the dependancies of Myclass. That's basically it. > > On Sun, Sep 23, 2012 at 8:31 PM, David Chelimsky > wrote: >> >> On Sun, Sep 23, 2012 at 7:55 PM, S Ahmed wrote: >> > I have a cla

Re: [rspec-users] How can I create a active-record model w/o depending on the database?

2012-09-23 Thread David Chelimsky
On Sun, Sep 23, 2012 at 7:55 PM, S Ahmed wrote: > I have a class that takes a class that inherits from activerecord as a > parameter, e.g.: > > class SomeModel < ActiveRecord::Base > end > > class MyClass > attr_accessor :model > def initialize(model) > @model = model > end > end > > > T

Re: [rspec-users] Rspec for thor script

2012-09-14 Thread David Chelimsky
On Fri, Sep 14, 2012 at 11:31 AM, ankush m. wrote: > Hello all, > I recently developed a CLI extending thor API. > While i was trying to write specs for thor's tasks, I couldn't find any > way to write the same for tasks with mandatory options or with options. > So can anyone please gui

Re: [rspec-users] how to stop rspec from creating helper/view specs?

2012-09-14 Thread David Chelimsky
On Fri, Sep 14, 2012 at 11:20 AM, S Ahmed wrote: > I tried adding this to my application.rb: > > config.generators do |g| > g.view_specs false > g.helper_specs false > end See "Customizing your workflow" on http://guides.rubyonrails.org/generators.html According to that, you need to somethin

Re: [rspec-users] Newbie testing questions

2012-09-09 Thread David Chelimsky
On Fri, Sep 7, 2012 at 2:14 PM, Anand K V R. wrote: > Hi Friends. > > I'm an absolute Tester (little experience on development upto college > level) and had been asked to Test an application developed in Rails. As > our client selected Rspec, I have no other go. > > Can anyone help me with a basic

Re: [rspec-users] Stub a controller method containing arguments

2012-09-09 Thread David Chelimsky
On Sun, Sep 9, 2012 at 1:00 AM, jeevan reddy wrote: > controller code: > > class BooksController < ApplicationController > def index >param1, param2 = "123", "456" > @test = method_1(param1, param2) > end > > private > def method_1(param1, param2) > return "test" > end > end

Re: [rspec-users] your cuke forum is not opening

2012-09-04 Thread David Chelimsky
On Tue, Sep 4, 2012 at 12:57 AM, Fahim Patel wrote: > https://groups.google.com/forum/?fromgroups#!forum/cukes. > > this link is not opening... > can u give me accurate link... Try http://groups.google.com/group/cukes ___ rspec-users mailing list rspec

Re: [rspec-users] Thanks

2012-09-01 Thread David Chelimsky
On Sat, Sep 1, 2012 at 6:43 AM, Fahim Patel wrote: > Selenium automates web browsers. > > Cucumber automates tests. > > > can u please explain this line?? Please read the docs for these tools: http://cukes.info/ http://seleniumhq.org/ > thanks > > can u give answer on this questions All of the

Re: [rspec-users] Question on Cucumber and siienium

2012-08-31 Thread David Chelimsky
On Fri, Aug 31, 2012 at 10:14 AM, Fahim Patel wrote: > > > Hi all > > I work on Rspec and now i see some more framework which is cucumber and > silenium > I have one question.. > > Which one is best for high level testing between cucumber and silinium? > > can we use both cucumber and silinium

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 9:16 AM, J. B. Rainsberger wrote: > On Wed, Aug 22, 2012 at 10:07 AM, David Chelimsky > wrote: >> >> On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberger wrote: >> > On Tue, Aug 21, 2012 at 11:37 PM, Bas Vodde wrote: >> >> >>

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberger wrote: > On Tue, Aug 21, 2012 at 11:37 PM, Bas Vodde wrote: >> >> >> JB is right. >> >> Sometimes, for clarity, it is useful to add should_not, but for >> functionality it is usually not needed. > > > I know JMock has never() for this people. Sho

Re: [rspec-users] and_raise with a message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 6:55 AM, David Chelimsky wrote: > On Wed, Aug 22, 2012 at 6:43 AM, Bas Vodde wrote: >> >> On 22 Aug, 2012, at 7:25 PM, David Chelimsky wrote: >> >>> On Wed, Aug 22, 2012 at 12:56 AM, Bas Vodde wrote: >>>> >>>> Hiya

Re: [rspec-users] and_raise with a message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 6:43 AM, Bas Vodde wrote: > > On 22 Aug, 2012, at 7:25 PM, David Chelimsky wrote: > >> On Wed, Aug 22, 2012 at 12:56 AM, Bas Vodde wrote: >>> >>> Hiya all, >>> >>> I was trying to get and_raise to raise an exception f

Re: [rspec-users] and_raise with a message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 12:56 AM, Bas Vodde wrote: > > Hiya all, > > I was trying to get and_raise to raise an exception filled with a message and > I was struggling with the API for a while (not on the latest RSpec, but > assume it didn't change). > > Based on that, I have a suggestion for impr

Re: [rspec-users] Fwd: [Rails] Re: hii friends, , , , , i m new to rails......i think there is a problem in destroy command .

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 12:40 AM, Fahim Patel wrote: > friends there is no reply from Rails community.Lots of days are gone. > can u answer this problem. > Regards > Fahim Babar Patel > > > -- Forwarded message -- > From: Fahim Patel > Date: Fri, Aug 17, 2012 at 10:49 AM > Subject

Re: [rspec-users] error

2012-08-16 Thread David Chelimsky
On Thu, Aug 16, 2012 at 1:06 AM, Fahim Patel wrote: > let me explain this problem > ---rails destroy Please post questions about Rails to the Rails mailing list: https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-talk __

Re: [rspec-users] Specing a method that returns a lambda

2012-08-11 Thread David Chelimsky
On Fri, Aug 10, 2012 at 8:22 AM, Iain Barnett wrote: > Hello, > > I have a class that takes callbacks and stores them for later use. It > supplies a default block for all the other methods to use, and you can set a > new default if you like. I want to check that the new default is being set > a

Re: [rspec-users] should_receive with block or proc?

2012-08-06 Thread David Chelimsky
On Mon, Aug 6, 2012 at 9:21 AM, Alexander Baronec wrote: > 2012/8/6 David Chelimsky >> >> On Mon, Aug 6, 2012 at 3:48 AM, Alexander Baronec >> wrote: >> > 2012/8/5 David Chelimsky >> >> >> >> On Sat, Aug 4, 2012 at 1:46 PM, Alexander Baron

Re: [rspec-users] should_receive with block or proc?

2012-08-06 Thread David Chelimsky
On Mon, Aug 6, 2012 at 3:48 AM, Alexander Baronec wrote: > 2012/8/5 David Chelimsky >> >> On Sat, Aug 4, 2012 at 1:46 PM, Alexander Baronec >> wrote: >> > Hello. >> > How can I test object to receive message and compare arguments of this >> > mes

Re: [rspec-users] should_receive with block or proc?

2012-08-05 Thread David Chelimsky
On Sat, Aug 4, 2012 at 1:46 PM, Alexander Baronec wrote: > Hello. > How can I test object to receive message and compare arguments of this > message with value evaluated at present time? It is possible? > > For example: > > should_receive(:api_send).with( -> { players.count } ) And players.count >

Re: [rspec-users] Mock_model not recognizing act_as_mappable

2012-08-03 Thread David Chelimsky
On Fri, Aug 3, 2012 at 9:33 AM, Steve Loo wrote: > I am using mock_model in my tests, and I encountered a situation where my > stub is failing. You want stub_model for this case because you're counting on functionality that is built into your real model. See https://www.relishapp.com/rspec/rspec

Re: [rspec-users] "config.before(:each)" is not run after "let!" ?

2012-08-02 Thread David Chelimsky
On Thu, Aug 2, 2012 at 6:29 PM, Patrick J. Collins wrote: >> let! adds a before hook and before hooks get run in the order they're >> declared, so just declare them in the other order: >> >> let!(:yo_momma) { create_yo_momma } >> config.before(:each) do >> ActionMailer::base.deliveries.clear >>

Re: [rspec-users] "config.before(:each)" is not run after "let!" ?

2012-08-02 Thread David Chelimsky
On Thu, Aug 2, 2012 at 4:24 PM, Patrick J. Collins wrote: > I have a model with an observer that emails out upon creation, and I > want to do some testing of emails that get generated via various > actions... So I was hoping I could do: > > # spec_helper.rb > > config.before(:each) do > ActionM

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-26 Thread David Chelimsky
On Thu, Jul 26, 2012 at 4:08 PM, James Cox wrote: > Chris, > > On Tue, Jul 24, 2012 at 4:54 PM, Chris Flipse wrote: >> >> >> >> On Tue, Jul 24, 2012 at 1:55 PM, James Cox wrote: >>> >>> so yes, pending is ok, but a second keyword "broken" might be nicer, >>> which would act the same but output d

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-26 Thread David Chelimsky
On Thu, Jul 26, 2012 at 4:06 PM, James Cox wrote: >> > so yes, pending is ok, but a second keyword "broken" might be nicer, >> > which would act the same but output different info. >> >> You can actually do that! >> >> RSpec.configuration do |c| >> c.alias_example_to :broken, :pending => "Broken

Re: [rspec-users] rspec-rails does not have a matcher for assert_generates

2012-07-26 Thread David Chelimsky
On Thu, Jul 26, 2012 at 6:07 AM, deepak kannan wrote: > hi, > > rails minitest has assertions for assert_generates, assert_recognizes and > assert_routing > > rpsec's "routes_to" delegates to assert_recognizes > http://rubydoc.info/gems/rspec-rails/frames > > But there is no mention of assert_gene

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-25 Thread David Chelimsky
b#L69-104 HTH, David > > -james > > On Mon, Jul 23, 2012 at 10:58 PM, Adam Sroka wrote: >> I haven't posted in a while, but I want to say that as someone who spends a >> significant portion of his time teaching (T/B)DD I am totally in love with >> pending specs.

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-23 Thread David Chelimsky
On Mon, Jul 23, 2012 at 11:19 AM, James Cox wrote: > Hey, > > in a bunch of the rescues i've recently done, I see a pretty big anti > pattern: tests don't work, and so rather than making them work, the > dev team just comments them out till 'later'. > > Does anyone think it'd be useful/interesting

Re: [rspec-users] Issue when testing ActiveRecord after_commit callbacks

2012-06-28 Thread David Chelimsky
On Thu, Jun 28, 2012 at 2:11 PM, Dennis Kuczynski wrote: > In an ActiveRecord model, I have an after_commit callback (:enqueue_job) > which places a job on my background processing queue (Sidekiq) > > To test that the callback was firing when the database transaction > was committed, I was using:

Re: [rspec-users] Rails 3.2 initializers not running when running Rspec without Spork

2012-06-25 Thread David Chelimsky
file > https://gist.github.com/2991803 > > The class that is missing is Web which actually does exist in initializers > https://gist.github.com/2991809 > > -- > Sincerely, > Avi Tzurel > > English blog: http://www.kensodev.com > Hebrew Blog: http://he.kensodev.co

Re: [rspec-users] Rails 3.2 initializers not running when running Rspec without Spork

2012-06-25 Thread David Chelimsky
On Mon, Jun 25, 2012 at 6:07 PM, Avi Tzurel wrote: > Hi, > > We upgraded our app from 3.0.9 to 3.2.5. > Latest Rspec version running of course. > > When I run rspec command, I get uninitialized constant error. > The constant that Rspec is alerting on is in the initializers class. > > it seems that

Re: [rspec-users] response.should have_content("1 movie") does not seem to work for me

2012-06-22 Thread David Chelimsky
On Fri, Jun 22, 2012 at 4:36 AM, Joshua Muheim wrote: > It seems I have to use > > page.should have_content("...") > > instead of > > response.should have_content("...") > > Maybe that's because Capybara is the default engine now and not Webrat? While Capybara seems to have become the de facto st

Re: [rspec-users] An open source project with very good use of Cucumber?

2012-06-22 Thread David Chelimsky
On Fri, Jun 22, 2012 at 4:34 AM, Joshua Muheim wrote: > Hey everybody > > I came here through the RSpec Book, so I grant myself to ask something > about Cucumber here. ;) You can ask, but you'll probably have a more well versed Cucumber-using audience on the Cucumber list: https://groups.google.

Re: [rspec-users] shared examples with controllers + included modules?

2012-06-19 Thread David Chelimsky
On Tue, Jun 19, 2012 at 12:16 AM, Patrick J. Collins wrote: > Hi everyone, > > I ran into a little problem this evening and couldn't quite figure out > how to solve it... > > So, then I had a controller test like: > > describe FooController do >  it_behaves_like "omg", subject > end > > ... > > s

Re: [rspec-users] "it" blocks not executing

2012-06-09 Thread David Chelimsky
On Thu, Jun 7, 2012 at 11:51 AM, Robbie Leib wrote: > * > * > rspec.rake > * > * > > gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 This might be t

Re: [rspec-users] Rspec include paths

2012-06-08 Thread David Chelimsky
On Fri, Jun 8, 2012 at 4:03 PM, Michael Madrid wrote: > 'm using rspec 2.10 with Rails 3.2.1 and have problems with classes not > being found. > > I have put a class called DbTasks under a dir app/util. Under spec, i've > created file util/db_tasks_spec.rb which runs afer i included the line: > >

Re: [rspec-users] Slow Focus tags

2012-06-07 Thread David Chelimsky
it's where we see the error/problem we suspect it's origin. >> And integration between all the testing tools is tricky to balance for >> devs. >> >> On Thu, Jun 7, 2012 at 12:15 PM, David Chelimsky >> wrote: >>> >>> On Thu, Jun 7, 2012 at 5:54

Re: [rspec-users] Slow Focus tags

2012-06-07 Thread David Chelimsky
search. Cheers, David > > On Thu, Jun 7, 2012 at 12:15 PM, David Chelimsky > wrote: >> >> On Thu, Jun 7, 2012 at 5:54 AM, David Chelimsky >> wrote: >> > On Thu, Jun 7, 2012 at 4:00 AM, Rainer Kuhn wrote: >> >> I narrowed it down to three things, the fir

Re: [rspec-users] Slow Focus tags

2012-06-07 Thread David Chelimsky
On Thu, Jun 7, 2012 at 6:17 AM, Rainer Kuhn wrote: > My guess was wrong, it can't seem to handle empty fixtures yml files. The > gist contains only a brief snippets of the actual log, but you can see that > it's trying to load fixtures from multiple specs > > https://gist.github.com/2888253 > > ca

Re: [rspec-users] Slow Focus tags

2012-06-07 Thread David Chelimsky
On Thu, Jun 7, 2012 at 5:54 AM, David Chelimsky wrote: > On Thu, Jun 7, 2012 at 4:00 AM, Rainer Kuhn wrote: >> I narrowed it down to three things, the first one might be interesting to >> you, the other ones are my problem, although probably common among lots of >> projects:

Re: [rspec-users] Slow Focus tags

2012-06-07 Thread David Chelimsky
On Thu, Jun 7, 2012 at 4:00 AM, Rainer Kuhn wrote: > I narrowed it down to three things, the first one might be interesting to > you, the other ones are my problem, although probably common among lots of > projects: > > Since we don't mock we usually need a bit of test data prepared for each > tes

Re: [rspec-users] Slow Focus tags

2012-06-06 Thread David Chelimsky
https://gist.github.com/2881400 There's a lot there. Redis, fog, all the macros modules. Any of them could be contributing. > On Wed, Jun 6, 2012 at 12:24 PM, David Chelimsky > wrote: >> >> On Wed, Jun 6, 2012 at 5:14 AM, Rainer Kuhn wrote: >> > [This is my third a

Re: [rspec-users] Slow Focus tags

2012-06-06 Thread David Chelimsky
On Wed, Jun 6, 2012 at 5:14 AM, Rainer Kuhn wrote: > [This is my third and final attempt to post to this group, first 2 were with > google groups] The google group is a mirror of the rspec-users list, but for that to work you actually have to post to the rspec-users list, not the google group. We

Re: [rspec-users] "it" blocks not executing

2012-06-06 Thread David Chelimsky
On Tue, Jun 5, 2012 at 3:47 PM, Robbie Leib wrote: > Rails 2.3.14 app > > rspec (1.3.2) > rspec-rails (1.3.4) > > When I run bundle exec rake spec, not matter what, I get: > > 0 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 > notifications This is not rspec's output, so s

Re: [rspec-users] overview of how rspec was designed

2012-05-15 Thread David Chelimsky
On Mon, May 14, 2012 at 2:23 PM, S Ahmed wrote: > Other than jumping into the codebase myself, I was wondering if anyone has > done a high-level (or better yet low level) write-up on how rspec works > under the covers? The RSpec Book has a fairly deep discussion on the inner workings. Other than

Re: [rspec-users] Stubs and contract tests

2012-05-11 Thread David Chelimsky
On Fri, May 11, 2012 at 9:24 AM, Alexandre de Oliveira < chavedomu...@gmail.com> wrote: > Hey guys, could you help me (in)validating an idea? > > As you might know, Contract tests solve a problem stubs have: if the > object interface changes, the stubbed tests will continue passing. > > In RSpec,

Re: [rspec-users] how do I test for a status code in a :js => true test?

2012-05-10 Thread David Chelimsky
On Wed, May 9, 2012 at 11:14 PM, Patrick J. Collins wrote: > I have a view with some javascript that does page redirection, and I > wanted to confirm that under certain circumstances the user will get a > 500 error from CanCan::AccessDenied. > > It seems that when I am not using :js => true, I can

Re: [rspec-users] is there a way to turn on :js => true in the middle of a spec?

2012-05-09 Thread David Chelimsky
On Wed, May 9, 2012 at 3:09 PM, Patrick J. Collins wrote: > Hi, > > If I have a spec with some complicated background stuff--  like say for > example logging in... > > it "does stuff", :js => true do >  fancy_login_helper_method >  visit somewhere_over_the_rainbow_path >  click_button "omg" >  pag

Re: [rspec-users] stub.as_null_object mock and double

2012-05-09 Thread David Chelimsky
On Wed, May 9, 2012 at 11:01 AM, Andrew Premdas wrote: > Hi there, > > Is there any particular reason why stub is not stub.as_null_object by > default? See https://github.com/rspec/rspec-mocks/issues/56 ___ rspec-users mailing list rspec-users@rubyforge

Re: [rspec-users] Retrying specs

2012-05-08 Thread David Chelimsky
On Tue, May 8, 2012 at 12:55 PM, Samer Masry wrote: > Is it possible to run an example without displaying it's > status ...F... The 'F' comes from the ProgressFormatter. You could write your own custom formatter. https://www.relishapp.com/rspec/rspec-core/docs/formatters/custom-formatters > I'm

[rspec-users] rspec-mocks and rspec-rails-2.10.1 are released!

2012-05-04 Thread David Chelimsky
These are patch releases recommended for anybody who has already upgraded to 2.10. ### rspec-mocks-2.10.1 full changelog: http://github.com/rspec/rspec-mocks/compare/v2.10.0...v2.10.1 Bug fixes * fix [regression of edge case behavior](https://github.com/rspec/rspec-mocks/issues/132) * fixed

Re: [rspec-users] rspec 2.10.0 breaks controller specs...

2012-05-04 Thread David Chelimsky
On Fri, May 4, 2012 at 3:07 PM, Patrick J. Collins wrote: > Apparently 2.10.0 doesn't like this line in devise's > lib/devise/test_helpers.rb >  @request.env['warden'] = Warden::Proxy.new(@request.env, manager) Please file bug reports to https://github.com/rspec/rspec-rails/issues, and please lo

[rspec-users] rspec-2.10 is released!

2012-05-03 Thread David Chelimsky
rspec-2.10 is released! Cucumber docs http://rubydoc.info/gems/rspec-core http://rubydoc.info/gems/rspec-expectations http://rubydoc.info/gems/rspec-mocks http://rubydoc.info/gems/rspec-rails API Docs (RDoc) http://relishapp.com/gems/rspec-core http://relishapp.com/gems/rspec-expectations http:

Re: [rspec-users] stuck in testing hell...

2012-05-01 Thread David Chelimsky
On Tue, May 1, 2012 at 2:17 PM, Patrick J. Collins wrote: >> The frustration your experiencing is actually a good thing, its your brain >> saying "hey something is just not right". Of >> course our natural reaction to this is just to get angry, but if we can get >> past that there is an opportun

[rspec-users] This is a test to see if the google mirror is working again

2012-04-26 Thread David Chelimsky
This is a test to see if the google mirror is working again. Sorry for the noise. Cheers, David ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] New google groups (help, please)

2012-04-25 Thread David Chelimsky
Hi all. Google is in the process of changing the google group format and, unless I'm missing something, seems to have abandoned the mirror functionality this list has relied on for several years now (posting to rspec-users also posts to the google group). If anybody on this list knows how to solv

Re: [rspec-users] How to modify database inside a transaction in before(:all)?

2012-04-23 Thread David Chelimsky
On Mon, Apr 23, 2012 at 5:39 PM, Rodrigo Rosenfeld Rosas wrote: > I have a set of examples that should run with a specific set of records in > the database. > > Since setting those records is an expensive operation I'd like to perform it > just once per context. > > For example: > > context 'sampl

Re: [rspec-users] using rspec in a non-rails environment

2012-04-23 Thread David Chelimsky
On Mon, Apr 23, 2012 at 12:26 PM, S Ahmed wrote: > My folder structure is as follows: > > /myapp/ > /myapp/lib/class1.rb > > /myapp/rspec/spec_helper.rb > /myapp/rspec/lib/class1_spec.rb > > My spec_helper has: > > require 'rubygems' ^^ If you've installed rspec as a gem and you're running the rs

Re: [rspec-users] One error reported recursively if two pages visited by request spec

2012-04-22 Thread David Chelimsky
github.com/rspec/rspec-mocks.git" gem 'capybara', '1.1.2' end Cheers, David -- David Chelimsky Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Thursday, April 19, 2012 at 5:55 PM, Mark Berry wrote: > On Thu, Apr 19, 2012 at 8:54 AM, Mark Berry (mailto:mc

Re: [rspec-users] how can I get prettier failure messages for integration specs?

2012-04-18 Thread David Chelimsky
On Wednesday, April 18, 2012 at 11:30 PM, Patrick J. Collins wrote: > On Wed, 18 Apr 2012, David Chelimsky wrote: > > If you're using capybara you could put save_and_open_page in an after hook. > > You'd still get the console output, but at least you'd

Re: [rspec-users] how can I get prettier failure messages for integration specs?

2012-04-18 Thread David Chelimsky
On Wednesday, April 18, 2012 at 7:01 PM, Patrick J. Collins wrote: > When an integration test fails, I get a whole mess of garbage that is > all in red, very painful to the eyes-- Especially when I quickly just > want to see what went wrong-- in this case, all I want to see is > ActiveRecord::Recon

Re: [rspec-users] One error reported recursively if two pages visited by request spec

2012-04-18 Thread David Chelimsky
On Wednesday, April 18, 2012 at 4:30 PM, Mark Berry wrote: > > On Wed April 18, 2012 at 5:35 AM, David Chelimsky wrote: > > On Tuesday, April 17, 2012 at 11:11 PM, Mark Berry wrote: > > > Hi, > > > > > > I'm using Rails 3.1.3, rspec-rails 2.9.0, and

Re: [rspec-users] Access controller object in controller macro

2012-04-18 Thread David Chelimsky
On Tuesday, April 17, 2012 at 2:30 PM, Nasir Jamal wrote: > > Hi > > We have just upgraded our Rails 2.3.11 app to Rails 3.0.0 and Rspec 1.3.2 to > 2.6. We are having two problems with rspec currently and any help would be > great. > > 1) We have some controller macros where we have been using

Re: [rspec-users] One error reported recursively if two pages visited by request spec

2012-04-18 Thread David Chelimsky
On Tuesday, April 17, 2012 at 11:11 PM, Mark Berry wrote: > Hi, > > I'm using Rails 3.1.3, rspec-rails 2.9.0, and Ruby 1.9.3p0. > > I've been getting recursive errors, where one error is reported > multiple times. It's quite spectacular in a long suite, with the > errors overflowing the console b

Re: [rspec-users] Smart mocks for ActiveRecord to speed up tests

2012-04-15 Thread David Chelimsky
On Sunday, April 15, 2012 at 9:23 PM, Rodrigo Rosenfeld Rosas wrote: > Em 14-04-2012 10:11, David Chelimsky escreveu: > > On Friday, April 13, 2012 at 2:09 PM, Rodrigo Rosenfeld Rosas wrote: > > > Hello old friends, I'm getting back to Rails and Ruby programming full

Re: [rspec-users] RSpec exactly behavior (it doesn't exactly fail)

2012-04-15 Thread David Chelimsky
Sorry about that. I don't always jump on things like that, but this one was bugging me and I had the time so I just did it. That doesn't always happen :) I look forward to your future contributions. Cheers, David -- David Chelimsky Sent with Sparrow (http://www.sparrowmailapp.com/

Re: [rspec-users] RSpec exactly behavior (it doesn't exactly fail)

2012-04-15 Thread David Chelimsky
Actually I just went ahead and fixed it sans-bug report: https://github.com/rspec/rspec-mocks/commit/fb9c76c2e40b4b25f4dcc5de95f8c60319b6d9c1. It'll be fixed in the next release (2.10). Cheers, David -- David Chelimsky Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Sunday,

Re: [rspec-users] RSpec exactly behavior (it doesn't exactly fail)

2012-04-15 Thread David Chelimsky
On Sunday, April 15, 2012 at 1:32 AM, Bas Vodde wrote: > > Hiya all, > > I've got a quick question related to RSpec. I was test-driving some code and > ended up in an endless loop. I was surprised by this, but traced it down to > the mock not failing on additional calls but only in the end. Let

Re: [rspec-users] Smart mocks for ActiveRecord to speed up tests

2012-04-14 Thread David Chelimsky
#x27;s not pretty, but it's the best way I know of to get what you're after. I started a lib called stubble a few years back that attempted to address this more holistically (https://github.com/dchelimsky/stubble) but I never released it as a gem because there were just too many diff

Re: [rspec-users] Error running RSpec on RVM OSX Lion

2012-04-11 Thread David Chelimsky
On Tue, Apr 10, 2012 at 5:28 PM, Ryan Macy wrote: > /Users/ryanmacy/.rvm/gems/ruby-1.9.2-p318/gems/ffi-1.0.11/lib/ffi/ > library.rb:121:in `block in ffi_lib': Could not open library '/usr/lib/ > liblpcapi_ssl.so': dlopen(/usr/lib/liblpcapi_ssl.so, 5): image not > found (LoadError) >        from /U

Re: [rspec-users] Argument Non-Matchers

2012-04-11 Thread David Chelimsky
On Wed, Apr 11, 2012 at 12:18 PM, Matt Hauck wrote: > On Tuesday, April 10, 2012 8:48:37 PM UTC-7, Justin Ko wrote: >> >> >> On Apr 9, 2012, at 2:41 PM, Matt Hauck wrote: >> >> Is there a way to specify a message expectation on an object to occur >> _without_ a particular argument? >> >> There is

Re: [rspec-users] Autotest and Colors with Rspec

2012-04-07 Thread David Chelimsky
I added basic information to the README: https://github.com/rspec/rspec-core -- David Chelimsky Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Saturday, April 7, 2012 at 9:59 AM, David Chelimsky wrote: > On Apr 6, 2012, at 16:07, seattlelite (mailto:ryanac...@gmail.com)>

Re: [rspec-users] Autotest and Colors with Rspec

2012-04-07 Thread David Chelimsky
On Apr 6, 2012, at 16:07, seattlelite wrote: > Question 1. > I'm using Ruby 1.9.2, Rails 3.0.7 and I have RSpec and Autotest installed, > but Autotest is not running my specs - it's running Unit:Test installed. How > do I get it to run my Rspecs? > > I tried this: > > (a) http://blog.davidc

Re: [rspec-users] The test is failing Whyy?

2012-04-04 Thread David Chelimsky
On Wed, Apr 4, 2012 at 7:47 AM, Lunarose A. wrote: > I am actually a newbie in Ruby rails nd Rspec.. So it could be something > basic.. Plz helpp > > > This is my rspec test code:: > >  describe "GET new" do >    it "assigns a new kase as @kase" do >      get :new >      assigns(:kase).should be_a

[rspec-users] rspec-expectations-2.9.1 is released!

2012-04-03 Thread David Chelimsky
rspec-expectations-2.9.1 is released! This is a bug-fix only release, and is recommended for everybody using rspec-2.9. ### rspec-expectations-2.9.1 / 2012-04-03 [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.9.0...2.9.1) Bug fixes * Provide a helpful message if the di

Re: [rspec-users] using shared_context in a global way

2012-04-02 Thread David Chelimsky
On Sun, Apr 1, 2012 at 11:34 PM, Bradley wrote: > I have some let and before declarations that I want to define for all of my > tests.  I can't seem to figure out how to do this in a clean way (ie by > including a module in my Rspec config).  I don't want to have to > include_context for each test

  1   2   3   4   5   6   7   8   9   10   >