Re: [rspec-users] SOAP / VCR / General Advice

2012-04-15 Thread Michael Guterl
On Fri, Apr 13, 2012 at 2:24 AM, Justin Ko wrote: > > On Apr 11, 2012, at 7:08 AM, Michael Guterl wrote: > >> I'm building a ruby wrapper for a SOAP service using savon and I'm >> running into some issues with testing and I would love some feedback. >> I have

[rspec-users] SOAP / VCR / General Advice

2012-04-11 Thread Michael Guterl
stub out specific requests to simulate different conditions. Any feedback is greatly appreciated. Best, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] requests: is it possible to put the fill_in's into a method?

2012-02-26 Thread Michael Guterl
quot;, :with => attributes[:first_name] fill_in "Last Name", :with => attributes[:last_name] fill_in "Email Address", :with => attributes[:email] fill_in "Password", :with => attributes[:password] fill_in "Confirm Password", :with => at

Re: [rspec-users] NoMethodError: undefined method `expect'

2012-01-17 Thread Michael Guterl
from .../.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/dsl.rb:18:in > `describe' > from (irb):4 > from .../.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `' > ruby-1.9.2-p290 :007 > > > []s! > You need to put your expectations in an it block. describe &#

Re: [rspec-users] Matcher for testing file content.

2011-12-20 Thread Michael Guterl
content" > or > file_content("/path/to/file.txt").should == "File content" > > or something else? > File.read("/path/to/file") will give you a string of the entire contents of the file. File.read("/path/to/file").sho

Re: [rspec-users] rspec and shoulda have_indices

2011-09-03 Thread Michael Guterl
My guess is that it is checking for an compound index on all of those fields. Try specifying them individually and not in an array. On Fri, Sep 2, 2011 at 7:07 PM, slavix wrote: > now getting > Failure/Error: it { should > have_db_index([:user, :currency, :tradable]) } >       Expected Balance t

Re: [rspec-users] Best way to test tasks

2011-08-02 Thread Michael Guterl
suming you are asking about rake tasks... I typically extract the body of the task into a method and then test that method. This typically leaves the rake task very thin and I do not worry about testing the task itself. Best, Michael Guterl ___ rsp

Re: [rspec-users] Time out long running tests using Rspec 2

2011-06-27 Thread Michael Guterl
On Tue, Jun 21, 2011 at 8:13 AM, Sidu Ponnappa wrote: > I'm cross posting a query on timing out tests that came up on our local ruby > list: > >> In RSpec1, there was an option "timeout" using which we can fail all >> the long running tests i.e. "spec --timeout 2 spec/" will fail those >> tests wh

[rspec-users] current example

2011-03-23 Thread Michael Guterl
Is it possible to retrieve the example that is currently running? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Counter.should_not_receive(:message) not working?

2011-03-17 Thread Michael Guterl
t; > Controller: > def show >  @counter = Counter.increment if count_me Should this be params[:count_me]? ---^ Best, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Stubbing Sleep

2011-02-22 Thread Michael Guterl
on in my > tests if possible. I was thinking that perhaps a virtual clock would be > better, but then I've still got the sleep issue to deal with. > Eric Hodel recently blogged about this: http://blog.segment7.net/2011/01/06/how-to-sleep-in-tests Best, Michael Guterl ___

Re: [rspec-users] Rails 3 / RSpec 2 use_transactional_fixtures and after_commit

2011-02-09 Thread Michael Guterl
t helper for running with transactional fixtures turned on. That is the piece that needs to be ported over to Rails 3. Best, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] feedback on matcher

2011-01-27 Thread Michael Guterl
On Thu, Jan 27, 2011 at 2:05 PM, Michael Guterl wrote: > On Thu, Jan 27, 2011 at 10:30 AM, David Chelimsky > wrote: >> >> On Jan 27, 2011, at 7:48 AM, Michael Guterl wrote: >> >>> We have moved from Rails 2 to 3 and the changing Mailer syntax has >>&

Re: [rspec-users] feedback on matcher

2011-01-27 Thread Michael Guterl
On Thu, Jan 27, 2011 at 10:30 AM, David Chelimsky wrote: > > On Jan 27, 2011, at 7:48 AM, Michael Guterl wrote: > >> We have moved from Rails 2 to 3 and the changing Mailer syntax has >> caused us to rewrite some of our specs. >> >>

Re: [rspec-users] feedback on matcher

2011-01-27 Thread Michael Guterl
On Thu, Jan 27, 2011 at 10:30 AM, David Chelimsky wrote: > > On Jan 27, 2011, at 7:48 AM, Michael Guterl wrote: > >> We have moved from Rails 2 to 3 and the changing Mailer syntax has >> caused us to rewrite some of our specs. >> >>

[rspec-users] feedback on matcher

2011-01-27 Thread Michael Guterl
and_return(mail) end end Mailer.should deliver(:job_application).with(@job.id, @user.id) --- Is this a sane approach? Would it have been better to adapt the Mailer interface to comply with the specs? Best, Michael Guterl ___ rspec-users mailing list r

Re: [rspec-users] rspec 2.4 incorrect time reported

2011-01-14 Thread Michael Guterl
On Fri, Jan 14, 2011 at 11:05 AM, David Chelimsky wrote: > On Jan 14, 2011, at 9:56 AM, Michael Guterl wrote: > >> I keep seeing strange run times for our specs: >> >> Finished in -348317500.25314 seconds >> >> Any thoughts are much appreciated. > > Are y

[rspec-users] Rails 3 / RSpec 2 use_transactional_fixtures and after_commit

2011-01-14 Thread Michael Guterl
est helper:" ActiveRecord::Base.send(:include, AfterCommit::AfterSavepoint) ActiveRecord::Base.include_after_savepoint_extensions Anyone else ran into this? Best, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http:

[rspec-users] rspec 2.4 incorrect time reported

2011-01-14 Thread Michael Guterl
I keep seeing strange run times for our specs: Finished in -348317500.25314 seconds Any thoughts are much appreciated. Best, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] `rake spec` with rails 3.0.3 and rspec-rails 2.4.1

2011-01-13 Thread Michael Guterl
On Thu, Jan 13, 2011 at 4:40 PM, David Chelimsky wrote: > > On Jan 13, 2011, at 3:17 PM, Michael Guterl wrote: > >> We're upgrading a rails 2.3.x application to Rails 3.  When running >> `rake spec` no specs are running. >> >> $ rake spec --trace >

[rspec-users] `rake spec` with rails 3.0.3 and rspec-rails 2.4.1

2011-01-13 Thread Michael Guterl
rspec-mocks (2.4.0) rspec-rails (2.4.1) $ rails -v Rails 3.0.3 lib/tasks/rspec.rake is now gone because as I understand it rake tasks can be loaded through railtie integration in rails 3, which I believe rspec takes advantage of. Any pointers would be appreciated. Best, Michael G

Re: [rspec-users] RSpec uses at_exit - forks and stuff

2010-08-06 Thread Michael Guterl
OT to be the basis for an official rspec2-rails2 gem so please don't use >> this expecting a smooth upgrade path once such a gem exists. >> HTH, >> David > > Thanks for your input David, current fix is to monkey patch the offending > code and add  at_exit { exit! } to the end of each fork block. Not pretty, > but it will do for now. Clearly we will have to bite the bullet and go to > rails3 rspec2 at some point, struggling to keep up with the pace of change > at the moment. While I came up with my own solution to this problem, I would love to compare solutions. Here's what I came up with: http://gist.github.com/511874 Best regards, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Rails 3, Rspec 2, Autotest

2010-04-18 Thread Michael Guterl
On Sun, Apr 18, 2010 at 12:52 PM, Michael Guterl wrote: > On Sun, Apr 18, 2010 at 12:30 PM, Michael Guterl wrote: >> On Sat, Apr 17, 2010 at 11:10 AM, David Chelimsky >> wrote: >>> On Apr 17, 2010, at 9:42 AM, Tim Riendeau wrote: >>> >>> I am havin

Re: [rspec-users] Rails 3, Rspec 2, Autotest

2010-04-18 Thread Michael Guterl
On Sun, Apr 18, 2010 at 12:30 PM, Michael Guterl wrote: > On Sat, Apr 17, 2010 at 11:10 AM, David Chelimsky > wrote: >> On Apr 17, 2010, at 9:42 AM, Tim Riendeau wrote: >> >> I am having similar issue getting this working. I am running rails3.beta3 >> wi

Re: [rspec-users] Rails 3, Rspec 2, Autotest

2010-04-18 Thread Michael Guterl
g the steps in the updated gist I am seeing the same behavior that Mark is reporting. michaelgut...@carini ~/code/example$ autotest loading autotest/rails style: Rails -------- Best, Michael Guterl ___

Re: [rspec-users] test spies

2010-04-12 Thread Michael Guterl
On Mon, Apr 12, 2010 at 1:16 PM, David Chelimsky wrote: > On Apr 12, 2010, at 11:17 AM, Michael Guterl wrote: > >> I'm curious what the current state of test spies in rspec is? >> >> What is everyone using for this?  not a mock?  rr?  rspec-spies? >> I see t

[rspec-users] test spies

2010-04-12 Thread Michael Guterl
ought back in? I really like the rspec standard mock / stub syntax and am hesitant to move to another solution. Best, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Applying an rspec matcher against the elements of a collection

2010-02-23 Thread Michael Guterl
ed for comparing collections regardless of order, this is awesome! Thanks, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] testing named_scope

2010-01-23 Thread Michael Guterl
er's choice, i just want to get people's opinion on this :D While this is focused on shoulda, I still found it helpful for demonstrating how to properly deal with testing named_scopes. http://robots.thoughtbot.com/post/200254501/testing-named

Re: [rspec-users] should and != operator

2009-10-13 Thread Michael Guterl
> method '!='.  Expression x!=y is instead just syntactic sugar for > !(x==y). > This is not true in Ruby 1.9. You can define != separate from ==. Best, Michael Guterl ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Restful Authentication and Cucumber

2008-11-27 Thread Michael Guterl
quot;) >fills_in("password", :with => "password") >clicks_button("Log in") > end > I don't think Factory.define returns the instance that you defined and defining the factory certainly does not store the instance to the database. I'd reco