On Jun 11, 2010, at 10:17 PM, Rodrigo Rosenfeld Rosas wrote:
> Apparently Webrat is not yet compatible with Rails 3:
This is incorrect. It's just that webrat needs to be configured for :rack
instead of :rails:
Webrat.configure do |config|
config.mode = :rack
end
Since you'r
On Jun 13, 2010, at 5:32 PM, Kristian Mandrup
wrote:
shared_examples_for "a template that renders the messages/form
partial" do
it "renders the messages/form partial" do
view.should_receive(:_render_partial).
with(hash_including(:partial => "form"))
render
end
end
# new.html.erb
hello,
I'm running rspec 1.3.0 on Ruby 1.9.2-dev. It appears that when you
use `it` without a corresponding block, the test case is treated not
as pending, but instead throws an error inside rspec. I see that there
is a bug to this effect filed here:
https://rspec.lighthouseapp.com/projects/5645/t
shared_examples_for "a template that renders the messages/form
partial" do
it "renders the messages/form partial" do
view.should_receive(:_render_partial).
with(hash_including(:partial => "form"))
render
end
end
# new.html.erb
<%= render "sidebar", :recent_messages => @recent_me
Thanks! Just what I needed :)
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Jun 13, 2010, at 4:35 PM, Kristian Mandrup wrote:
> Hi David,
>
> Sounds great! Looking forward to more documentation :)
> I have now gone through all the examples in the RSpec book and got
> them working with the latest version of RSpec 2 and Rails 3 beta4.
> I only have one loose end:
>
> s
Hi David,
Sounds great! Looking forward to more documentation :)
I have now gone through all the examples in the RSpec book and got
them working with the latest version of RSpec 2 and Rails 3 beta4.
I only have one loose end:
shared_examples_for "a template that renders the messages/form
partial"
On Jun 13, 2010, at 4:15 PM, Tom Stuart wrote:
> Hi,
>
> RSpec has long had the ability to set a message expectation for a stubbed
> method without disrupting its (stubbed) return value. This is really helpful
> for a variety of reasons, not least because it decouples the stubbed method's
> re
Hi,
RSpec has long had the ability to set a message expectation for a stubbed
method without disrupting its (stubbed) return value. This is really helpful
for a variety of reasons, not least because it decouples the stubbed method's
return value from the expectation that the method will be call
On Jun 13, 2010, at 6:49 AM, Kristian Mandrup wrote:
> assigns(:message).should eq(@message)
>
> assign(:message, stub("Message", :text => "Hello world!"))
>
> Hmm, so 'assign' to assign a variable and 'assigns' to read an
> assigned variable?
> We need to update the RSpec 2 wiki or somewhere wi
Cause of error:
class Message < ActiveRecord::Base
belongs_to :recipient #, :class_name => User.name
--
it then by convention expects there to be a model class called
Recipient.
should instead be
class Message < ActiveRecord::Base
belongs_to :recipient, :class_name => User.name
But then the
assigns(:message).should eq(@message)
assign(:message, stub("Message", :text => "Hello world!"))
Hmm, so 'assign' to assign a variable and 'assigns' to read an
assigned variable?
We need to update the RSpec 2 wiki or somewhere with all these API
changes so it is clear to everyone.
On Jun 11, 9:
12 matches
Mail list logo