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
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
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
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
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
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
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
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
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
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
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
___
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
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
>>&
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.
>>
>>
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.
>>
>>
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
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
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:
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
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-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
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
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
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
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
___
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
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
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
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
> 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
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
31 matches
Mail list logo