Hey all, I'm trying to migrate over to Rails3/RSpec2 and I cannot seem
to get the specing of `render` right. I know there was some changes in
RSpec2 that affect this, and I was hoping to get a bit of help.
I have this is in a before block in a view spec:
view.should render_template("attachments/i
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
I can't seem to get spec_server to work correctly (I've never used it
before, so maybe I'm missing something?)
I start up spec_server as prescribed:
[EMAIL PROTECTED]:~/Documents/apps/CCW: rake spec:server:start
(in /Users/mdarby/Documents/Apps/CCW)
Starting up spec server.
Loading Rails enviro
Same thing unfortunately. It also happens when I add --drb to spec/
spec.opts and run autotest/autospec as well.
On Oct 31, 2008, at 5:47 PM, Mark Wilden wrote:
On Fri, Oct 31, 2008 at 2:34 PM, Matt Darby <[EMAIL PROTECTED]>
wrote:
I can't seem to get spec_server to work corr
Hrm... So... anyone? It seems like this should be kind of straight
forward :(
On Oct 31, 6:24 pm, "Mark Wilden" <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 31, 2008 at 2:52 PM, Matt Darby <[EMAIL PROTECTED]> wrote:
> > Same thing unfortunately. It also happens when I
ontroller.should_receive(:update_sandbox)
xhr :get, :new
end
# => Mock 'Sandbox' expected :render_to_string with
({:partial=>"new", :locals=>{:job=>#@name="Job_1014">, :bid=>#}}) once,
but received it 0 times
Any pointers would be greatly
On Jan 6, 2009, at 11:27 AM, David Chelimsky wrote:
On Tue, Jan 6, 2009 at 9:53 AM, Matt Darby
wrote:
I'm stumped. How would I go about specing the "update_sandbox"
method?
# bids_controller:
def new
@bid = Bid.new
respond_to do |wants|
wants.html { redirect_t
On Jan 6, 2009, at 1:16 PM, Stephen Eley wrote:
On Tue, Jan 6, 2009 at 10:53 AM, Matt Darby
wrote:
I'm stumped. How would I go about specing the "update_sandbox"
method?
I couldn't hope to compete with David's answer when it comes to
specifics, but more genera
ropose that the 'it' snippet is changed to the following:
it "${0:should ${1:description}}" ${3:do
${2:pending("Needs to be written")}
end}
This tweak simply adds a 'pending' statement as the body of a newly
created spec. When run, the tester will be aler
Ah, I was unaware of this. Thanks for the pointer.
On Jan 27, 2008, at 2:42 AM, Francois Wurmus wrote:
> Hi Matt,
>
> one way of doing this is to leave the block out and just write:
> it "should bla bla"
>
> No 'do', no 'end'. The example will be pending this way.
>
>
> François
___
Chris Olsen wrote:
> I can't figure out how to make the updates to allow for the route_form
> method to return a url that matches the expected.
Sorry to bump such an old post, but the interweb doesn't really show
anything for routing specs when it comes to nested resources. I just
find this una
ler => 'tasks', :action => 'new', :user_id =>
'2').should == '/users/2/tasks/new'
It will pass when your routes.rb has this:
map.resources :users do |users|
users.resources :tasks
end
Give that a whirl.
Cheers,
David
Thanks for the furth
ssue
after an update: http://railsforum.com/viewtopic.php?pid=52699#p52699
Thoughts?
Matt Darby, M.S.
IT Manager / Lead Web Developer
Dynamix Engineering Ltd.
1108 City Park Ave.
Columbus, OH 43206
Cell: (614) 403-5289
www.dynamix-ltd.com
On Jan 31, 2008, at 3:14 PM, David Chelimsky wrote:
Just a quick follow up; I reinstalled both the rspec and
rspec_for_rails plugins to CURRENT and all is up and running. (There
is a 'hook' depreciation notice, FYI)
On Feb 2, 2008, at 10:22 AM, Matt Darby wrote:
David, I'm running ZenTest 3.9.1 / RSpec 1.1.3 and I'm sud
That was the issue; I updated the RSpec and ZenTest gems, but not the
plugins.
On Feb 2, 2008, at 11:18 AM, David Chelimsky wrote:
Did you install both the rspec and rspec_on_rails 1.1.3 plugins?
On Feb 2, 2008, at 9:22 AM, Matt Darby <[EMAIL PROTECTED]> wrote:
David, I
Hrm.
I have a spec for a model 'Phase'. a Phase has a start and end date,
and a method 'percentage_complete' that calculates the percentage of
time that has already elapsed between said start and end dates.
This spec passes as expected:
module PhaseHelper
def valid_attributes
{
On Jul 1, 2008, at 10:10 PM, Camilo Torres wrote:
It seems your Phase.percentage_complete is not working as you expect.
It clearly returns 100 when you are specting 83. The test clearly said
that.
¿What is the implementation of your percentage_complete method?
It only fails when run via 'rake
On Jul 1, 2008, at 2:10 AM, Pat Maddox wrote:
What do you see when you puts the values of end_date, start_date, and
Date.today inside of #percentage_complete?
When run via TextMate/Rspec Bundle:
Date.today = 2008-07-01
self.start_date = 2008-06-26
self.end_date = 2008-07-02
When run via 'rak
On Jul 1, 2008, at 8:23 AM, Tom Stuart wrote:
$ ./script/console
>> Date.today.minus_with_duration(5.days)
=> Thu, 26 Jun 2008
>> Date.today.minus_without_duration(5.days.to_i)
=> Sun, 17 Sep 0825
Is this a load-order problem? Perhaps
ActiveSupport::CoreExtensions::Date::Calculations isn't kic
On Jul 1, 11:21 am, Matt Darby <[EMAIL PROTECTED]> wrote:
> On Jul 1, 2008, at 8:23 AM, Tom Stuart wrote:
>
> > $ ./script/console
> > >> Date.today.minus_with_duration(5.days)
> > => Thu, 26 Jun 2008
> > >> Date.today.minus_without_duration(5
Yeah - use the debugger (ruby-debug) and the failing test case:
it "should have 5.days as the proper fixnum" do
require 'rubygems'; require 'ruby-debug'; debugger
5.days.to_i.should == 5.days
end
Thanks for the reply, but what does this resolve?
It seems as this would be a bug upsteam, no?
__
Can you try these and tell us which ones pass and which ones fail?
rake spec
rake spec:models
script/spec spec
script/spec spec/models
script/spec spec/models -r
script/spec spec/models/phase_spec.rb
script/spec spec/models/phase_spec.rb -r
ruby spec/models/phase_spec.rb
ruby spec/models/phase_sp
On Jul 4, 2008, at 4:45 PM, David Chelimsky wrote:
So - how bad do you think this would suck to remove that feature?
Are you using it yourself?
All thoughts welcome.
Wasn't even aware that feature existed!
___
rspec-users mailing list
rspec-users
On Jul 9, 2008, at 3:08 PM, Tim Stevens wrote:
How do I override the value of a controller variable in a controller
spec. For ex, if I have an action with an array, I want to have
examples
with different variables in the array
def testing
my_array = [1,2,4]
end
How do I test this with diff
way to execute multiple rspec test scripts
from one central file?
I assume you're using Rails, from there you can see what RSpec tasks
are available via "rake -T spec"
Matt Darby, M.S.
Rails | PHP | Linux | MySQL | IT
Email: [EMAIL PROTECTED]
Skype: matt-darby
W
On Jul 11, 2008, at 1:04 PM, Reggie Mr. wrote:
Hi all,
I'm having trouble with rspec 1.1.4 and rjs
response.should have_rjs #this should be successful for any rjs
request; but fails
response.should have_rjs(:replace_html) #no luck
I have tried mocking the page object, but that also fails.
26 matches
Mail list logo